name = reference->getName();\r
width = reference->getWidth();\r
direction = reference->getDirection();\r
- purpose = reference->getPurpose();\r
- level = reference->getLevel(); \r
+ purpose = reference->getPurpose(); \r
connectedFrom = NULL;\r
}\r
\r
return -1;\r
}\r
else if ( reference->getMultiplicity() == -1) {\r
- return ifaceCount+1;\r
+ return ifaceCount;\r
}\r
- else if ( reference->getMultiplicity() > ifaceCount) {\r
- return ifaceCount+1;\r
+ else if ( ifaceCount < reference->getMultiplicity()) {\r
+ return ifaceCount;\r
}\r
return -1;\r
}\r
FunctionalInterface *inter = new FunctionalInterface(owner, reference);\r
inter->setWidth(width);\r
inter->setDirection(direction);\r
- inter->setPurpose(purpose);\r
- inter->setLevel(level); \r
+ inter->setPurpose(purpose); \r
inter->connectFrom(NULL);\r
- inter->setName(reference->getName()+"_"+QString::number(id));\r
+ inter->setName(reference->getName()+"_"+QString::number(id+1));\r
return inter;\r
}\r
\r