Просмотр исходного кода

Fix bug where saving shared map assets wouldn't work

Marcus Huderle 8 лет назад
Родитель
Сommit
dec99c8cac
1 измененных файлов: 3 добавлений и 1 удалений
  1. 3
    1
      project.cpp

+ 3
- 1
project.cpp Просмотреть файл

740
 }
740
 }
741
 
741
 
742
 void Project::updateMapAttributes(Map* map) {
742
 void Project::updateMapAttributes(Map* map) {
743
-    mapAttributesTableMaster.insert(map->index.toInt(nullptr, 0), map->name);
743
+    if (!mapAttributesTableMaster.contains(map->index.toInt())) {
744
+        mapAttributesTableMaster.insert(map->index.toInt(), map->name);
745
+    }
744
 
746
 
745
     // Deep copy
747
     // Deep copy
746
     QMap<QString, QString> attrs = mapAttributes.value(map->name);
748
     QMap<QString, QString> attrs = mapAttributes.value(map->name);