X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..07a20cc501e4061a82e7795d9243a4ff2512136a:/AbstractBoxItem.cpp?ds=sidebyside diff --git a/AbstractBoxItem.cpp b/AbstractBoxItem.cpp index 0afbe29..ec791fb 100644 --- a/AbstractBoxItem.cpp +++ b/AbstractBoxItem.cpp @@ -98,7 +98,7 @@ InterfaceItem* AbstractBoxItem::searchInterfaceByRef(ConnectedInterface *ref) { void AbstractBoxItem::addInterface(InterfaceItem *i, bool resetPosition) { interfaces.append(i); if (resetPosition) resetInterfacesPosition(); - updateGeometry(); + updateGeometry(InterfaceMove); update(); } @@ -108,7 +108,7 @@ void AbstractBoxItem::removeInterface(InterfaceItem *i) { delete i; //resetInterfacesPosition(); - updateGeometry(); + updateGeometry(InterfaceMove); update(); } @@ -158,7 +158,7 @@ void AbstractBoxItem::resetInterfacesPosition() { } } -void AbstractBoxItem::deplaceInterface(QPointF pos) { +void AbstractBoxItem::moveInterfaceTo(QPointF pos) { double positionRatio; if(currentInterface->getOrientation() == Parameters::North || currentInterface->getOrientation() == Parameters::South){ if(pos.x() < 0){ @@ -226,11 +226,12 @@ void AbstractBoxItem::updateInterfacesAndConnections() { foreach(InterfaceItem *item, interfaces){ item->updatePosition(); } + // NB: dunno the utility of this test !! if (getScene() != NULL) { // update all connections from/to this block foreach(ConnectionItem *item, getScene()->getConnectionItems()){ if ((item->getFromInterfaceItem()->getOwner() == this) || (item->getToInterfaceItem()->getOwner() == this)) { - item->setPathes(); + item->setPath(); } } }