Преглед изворни кода

Properly remove connections

Marcus Huderle пре 8 година
родитељ
комит
c553980105
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5
    0
      editor.cpp

+ 5
- 0
editor.cpp Прегледај датотеку

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