Browse Source

Properly remove connections

Marcus Huderle 6 years ago
parent
commit
c553980105
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      editor.cpp

+ 5
- 0
editor.cpp View File

166
             scene->removeItem(connection_item);
166
             scene->removeItem(connection_item);
167
             delete connection_item;
167
             delete connection_item;
168
             connection_item = NULL;
168
             connection_item = NULL;
169
+
170
+            if (map->connection_items.contains(curDirection)) {
171
+                delete map->connection_items.value(curDirection);
172
+                map->connection_items.remove(curDirection);
173
+            }
169
         }
174
         }
170
 
175
 
171
         ui->comboBox_ConnectedMap->setCurrentText("");
176
         ui->comboBox_ConnectedMap->setCurrentText("");