if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));
int dimY = dimensionStr.at(1).toInt(&ok);
if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));
+
+ QString visStr = funcElement.attribute("visible","none");
+ bool showItem = true;
+ if (visStr == "false") {
+ showItem = false;
+ }
ReferenceBlock *referenceMd5 = NULL;
ReferenceBlock *referenceXml = NULL;
}
GroupBlock* parentGroupBlock = AB_TO_GRP(((GroupItem *)parentItem())->getRefBlock());
- FunctionalBlock* functionalBlock = params->getGraph()->createFunctionalBlock(parentGroupBlock, reference);
+ FunctionalBlock* functionalBlock = params->getGraph()->createFunctionalBlock(parentGroupBlock, reference, false);
/* NB: addFunctionalBlock creates all interfaces from the reference, which is annoying when
reading bif_iface tags. Thus interface are all removed.
*/
}
// recreate all (non-control) interfaces because of some may have a multiplicity>1 with several examplars
- functionalBlock->removeAllInterfaces();
+ //functionalBlock->removeAllInterfaces();
QDomNodeList interfaceNodes = funcElement.elementsByTagName("bif_iface");
// setting interfaces (user name, and for multiplicity>1 may be create some new ones)
for(int i=0; i<interfaceNodes.length(); i++) {
interfaceItem->setOrientation(orientation);
interfaceItem->setPositionRatio(position);
}
+ setVisible(showItem);
updateGeometry(Resize);
}
writer.writeAttribute("position",attrPos);
QString attrDim = QString::number(getWidth()).append(",").append(QString::number(getHeight()));
writer.writeAttribute("dimension",attrDim);
+ if (!isVisible()) {
+ writer.writeAttribute("visible","false");
+ }
writer.writeStartElement("bif_parameters");
foreach(BlockParameter *param,refBlock->getParameters()){