Properly remove connections

This commit is contained in:
Marcus Huderle 2018-03-08 21:26:40 -08:00
parent 1e8d1d9497
commit c553980105

View file

@ -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("");