X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/624231601a0f5daea9b8809993ad3503beafce4f..7b1c7e44123b9b2626205a89e27b2a4712ea30c6:/FunctionalInterface.cpp?ds=sidebyside diff --git a/FunctionalInterface.cpp b/FunctionalInterface.cpp index 7224b3f..145b86a 100644 --- a/FunctionalInterface.cpp +++ b/FunctionalInterface.cpp @@ -76,10 +76,7 @@ AbstractInterface *FunctionalInterface::clone() { int id = getInterfaceMultiplicity(); if (id < 0) return NULL; FunctionalInterface *inter = new FunctionalInterface(owner, reference); - inter->setWidth(width); - inter->setDirection(direction); - inter->setPurpose(purpose); - inter->connectFrom(NULL); + inter->setWidth(width); inter->setName(reference->getName()+"_"+QString::number(id+1)); return inter; } @@ -104,7 +101,8 @@ bool FunctionalInterface::canConnectTo(AbstractInterface *iface) { */ if (direction == Input) return false; if (iface->isReferenceInterface()) return false; - if (iface->getConnectedFrom() != NULL) return false; + ConnectedInterface* connIface = AI_TO_CON(iface); + if (connIface->getConnectedFrom() != NULL) return false; // first case: interface of blocks within the same group if (getOwner()->getParent() == iface->getOwner()->getParent()) {