diff --git a/sources/diagram.cpp b/sources/diagram.cpp index d4808ac95..6d7b2d8e8 100644 --- a/sources/diagram.cpp +++ b/sources/diagram.cpp @@ -1036,6 +1036,12 @@ void Diagram::removeItem(QGraphicsItem *item) switch (item->type()) { + case Element::Type: + { + Element *elmt = static_cast(item); + elmt->unlinkAllElements(); + } + break; case Conductor::Type: { Conductor *conductor = static_cast(item);