X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/6a0ffdb10d7344d99e04c5518fca2b8295df94be..e40a5399ec7887c2606f18575c809b0d05b09278:/BoxItem.cpp diff --git a/BoxItem.cpp b/BoxItem.cpp index deee2cc..ae15002 100644 --- a/BoxItem.cpp +++ b/BoxItem.cpp @@ -406,13 +406,19 @@ void BoxItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { //cout << "block abs. pos: " << absPos.x() << "," << absPos.y() << " | "; //cout << "block current. pos: " << currentPosition.x() << "," << currentPosition.y() << " | "; - if ((gapX < 0) && (absPos.x() == marginConn)) { + if ((position == Left) || (position == Right)) { + gapX = 0; + } + else if ((gapX < 0) && (absPos.x() == marginConn)) { gapX = 0; } else if (absPos.x()+gapX < marginConn) { gapX = marginConn-absPos.x(); } - if ((gapY < 0) && (absPos.y() == marginConn)) { + if ((position == Top) || (position == Bottom)) { + gapY = 0; + } + else if ((gapY < 0) && (absPos.y() == marginConn)) { gapY = 0; } else if (absPos.y()+gapY < marginConn) { @@ -985,17 +991,6 @@ 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 createInterfaceItems();