X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/d30c9cf675ad7141d1c8e31d2e72315267d45cf2..f311fbc3e1436bf248c54225f0743cfa671c4bd7:/FunctionalInterface.cpp?ds=sidebyside 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; }