Fix crash

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4828 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-01-02 13:42:16 +00:00
parent 1b8b901ef6
commit 15fb7e94bd

View File

@@ -1036,6 +1036,12 @@ void Diagram::removeItem(QGraphicsItem *item)
switch (item->type()) switch (item->type())
{ {
case Element::Type:
{
Element *elmt = static_cast<Element*>(item);
elmt->unlinkAllElements();
}
break;
case Conductor::Type: case Conductor::Type:
{ {
Conductor *conductor = static_cast<Conductor *>(item); Conductor *conductor = static_cast<Conductor *>(item);