Properly remove connections
This commit is contained in:
parent
1e8d1d9497
commit
c553980105
1 changed files with 5 additions and 0 deletions
|
@ -166,6 +166,11 @@ void Editor::showCurrentConnectionMap(QString curDirection) {
|
||||||
scene->removeItem(connection_item);
|
scene->removeItem(connection_item);
|
||||||
delete connection_item;
|
delete connection_item;
|
||||||
connection_item = NULL;
|
connection_item = NULL;
|
||||||
|
|
||||||
|
if (map->connection_items.contains(curDirection)) {
|
||||||
|
delete map->connection_items.value(curDirection);
|
||||||
|
map->connection_items.remove(curDirection);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->comboBox_ConnectedMap->setCurrentText("");
|
ui->comboBox_ConnectedMap->setCurrentText("");
|
||||||
|
|
Loading…
Reference in a new issue