Browse Source

Fix bug where saving shared map assets wouldn't work

Marcus Huderle 6 years ago
parent
commit
dec99c8cac
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      project.cpp

+ 3
- 1
project.cpp View File

@@ -740,7 +740,9 @@ void Project::saveMap(Map *map) {
740 740
 }
741 741
 
742 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 747
     // Deep copy
746 748
     QMap<QString, QString> attrs = mapAttributes.value(map->name);