瀏覽代碼

Fix bug where saving shared map assets wouldn't work

Marcus Huderle 6 年之前
父節點
當前提交
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);