X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/624231601a0f5daea9b8809993ad3503beafce4f..7b1c7e44123b9b2626205a89e27b2a4712ea30c6:/GroupInterface.cpp diff --git a/GroupInterface.cpp b/GroupInterface.cpp index b59eb23..ecc6ba7 100644 --- a/GroupInterface.cpp +++ b/GroupInterface.cpp @@ -2,7 +2,7 @@ #include "FunctionalInterface.h" #include "GroupBlock.h" -GroupInterface::GroupInterface(AbstractBlock* _owner, const QString& _name, int _direction, int _purpose) throw(Exception) : ConnectedInterface(_owner,_name,"expression","",_direction,_purpose) { +GroupInterface::GroupInterface(AbstractBlock* _owner, const QString& _name, int _direction, int _purpose) throw(Exception) : ConnectedInterface(_owner,_name,"inherited","",_direction,_purpose) { if (! _owner->isGroupBlock()) throw(Exception(BLOCK_INVALID_TYPE)); connectedFrom = NULL; @@ -14,9 +14,7 @@ bool GroupInterface::isGroupInterface() { AbstractInterface *GroupInterface::clone() { GroupInterface *inter = new GroupInterface(owner,name,direction, purpose); - inter->setWidth(width); - inter->connectFrom(NULL); - + inter->setWidth(width); return inter; } @@ -43,7 +41,8 @@ bool GroupInterface::canConnectTo(AbstractInterface *iface) { */ if (iface->isReferenceInterface()) return false; - if (iface->getConnectedFrom() != NULL) return false; + ConnectedInterface* connIface = AI_TO_CON(iface); + if (connIface->getConnectedFrom() != NULL) return false; if (this->getOwner() == iface->getOwner()->getParent()) { if ((direction == Input) && (iface->getDirection() == Input)) return true;