X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/4cf57e6db08da791233d75237f62e74bc88dd427..14cd6d834ab531525a51c6a6992583b3e9143e02:/BoxItem.cpp?ds=inline diff --git a/BoxItem.cpp b/BoxItem.cpp index 34b567a..9ff42a8 100644 --- a/BoxItem.cpp +++ b/BoxItem.cpp @@ -572,11 +572,14 @@ void BoxItem::contextMenuEvent(QGraphicsSceneContextMenuEvent * event) { } } - if (iface->getInputModifier() != NULL) { - removeModifier = menu.addAction("Remove input modifier"); - } - if (iface->getInputModifier() != NULL) { - showModifier = menu.addAction("Show input modifier parameters"); + if (iface->getAssociatedIface() != NULL) { + ConnectedInterface* assoIface = AI_TO_CON(iface->getAssociatedIface()); + if (assoIface->getInputModifier() != NULL) { + removeModifier = menu.addAction("Remove input modifier"); + } + if (assoIface->getInputModifier() != NULL) { + showModifier = menu.addAction("Show input modifier parameters"); + } } } @@ -717,7 +720,7 @@ void BoxItem::loadFunctional(QDomElement funcElement) throw(Exception) { throw(Exception(PROJECTFILE_CORRUPTED)); } if (referenceMd5 != referenceXml) { - throw(Exception(PROJECTFILE_CORRUPTED)); + reference = referenceXml; } else { reference = referenceMd5; @@ -788,6 +791,17 @@ void BoxItem::loadFunctional(QDomElement funcElement) throw(Exception) { functionalBlock->addInterface(ctlIface); } } + // connect clk and rst to group clk/rst or to clkrstgen + if ((name != "clkrstgen") && (parentGroupBlock != NULL)) { + try { + functionalBlock->connectClkReset(); + } + catch(Exception e) { + AbstractBlock* source = (AbstractBlock *)(e.getSource()); + cerr << qPrintable(source->getName()) << ":" << qPrintable(e.getMessage()) << endl; + throw(e); + } + } // creating InterfaceItem initInterfaceItems();