Kaynağa Gözat

Properly remove connections

Marcus Huderle 6 yıl önce
ebeveyn
işleme
c553980105
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5
    0
      editor.cpp

+ 5
- 0
editor.cpp Dosyayı Görüntüle

@@ -166,6 +166,11 @@ void Editor::showCurrentConnectionMap(QString curDirection) {
166 166
             scene->removeItem(connection_item);
167 167
             delete connection_item;
168 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 176
         ui->comboBox_ConnectedMap->setCurrentText("");