From 15fb7e94bdf4e958562f0daf641d27bf0f3bf62e Mon Sep 17 00:00:00 2001 From: blacksun Date: Mon, 2 Jan 2017 13:42:16 +0000 Subject: [PATCH] Fix crash git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4828 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/diagram.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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);