cGate::isConnected distinguishes between beeing embedded into simple and non simple modules.
However, beeing embedded into a placeholder module is not treated properly. I changed the function as follows:
bool cGate::isConnected() const
{
// for compound modules, both inside and outside must be non-NULL,
// for simple modules, only check outside.
if (getOwnerModule()->isSimple())
return isConnectedOutside();
else if (getOwnerModule()->isPlaceholder())
return isConnectedOutside();
else
return prevgatep!=NULL && nextgatep!=NULL;
/*
// for compound modules, both inside and outside must be non-NULL,
// for simple modules, only check outside.
if (!getOwnerModule()->isSimple())
return prevgatep!=NULL && nextgatep!=NULL;
else
return isConnectedOutside();
*/
}
Now it works! Might not be the best solution though. If someone more experienced might countercheck I would be glad.