+void Dispatcher::removeBlockInterface(InterfaceItem *item) {
+ static QString fctName = "Dispatcher::removeBlockInterface()";
+#ifdef DEBUG_FCTNAME
+ cout << "call to " << qPrintable(fctName) << endl;
+#endif
+
+ /* first, remove all connections from item
+ NB: if there is a connection to a group interface, then this
+ method should not be called if the group interface is also
+ connected to another interface. Normally, this is not possible
+ because such a check is done when creating the contextual menu
+ that allows to remove an interface.
+ */
+ foreach(ConnectionItem* conn, item->connections) {
+ removeConnection(conn);
+ }
+
+ ConnectedInterface* ref = item->refInter;
+ item->getOwner()->removeInterface(item);
+ FunctionalBlock* fun = AB_TO_FUN(ref->getOwner());
+ fun->removeInterface(ref);
+}