X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..07a20cc501e4061a82e7795d9243a4ff2512136a:/FunctionalInterface.cpp?ds=inline diff --git a/FunctionalInterface.cpp b/FunctionalInterface.cpp index cc9f765..bce7ca1 100644 --- a/FunctionalInterface.cpp +++ b/FunctionalInterface.cpp @@ -65,10 +65,10 @@ int FunctionalInterface::getInterfaceMultiplicity() { return -1; } else if ( reference->getMultiplicity() == -1) { - return ifaceCount+1; + return ifaceCount; } - else if ( reference->getMultiplicity() > ifaceCount) { - return ifaceCount+1; + else if ( ifaceCount < reference->getMultiplicity()) { + return ifaceCount; } return -1; } @@ -82,7 +82,7 @@ AbstractInterface *FunctionalInterface::clone() { inter->setPurpose(purpose); inter->setLevel(level); inter->connectFrom(NULL); - inter->setName(reference->getName()+"_"+QString::number(id)); + inter->setName(reference->getName()+"_"+QString::number(id+1)); return inter; }