|
@@ -232,6 +232,7 @@ void Project::readMapAttributesTable() {
|
232
|
232
|
}
|
233
|
233
|
}
|
234
|
234
|
|
|
235
|
+ // Deep copy
|
235
|
236
|
mapAttributesTableMaster = mapAttributesTable;
|
236
|
237
|
mapAttributesTableMaster.detach();
|
237
|
238
|
}
|
|
@@ -357,7 +358,6 @@ void Project::readAllMapAttributes() {
|
357
|
358
|
if (!mapAttributes.contains(altMapName)) {
|
358
|
359
|
mapAttributes.insert(altMapName, QMap<QString, QString>());
|
359
|
360
|
}
|
360
|
|
- mapAttributes[altMapName]["attributes_label"] = attributeMapLabel;
|
361
|
361
|
mapAttributes[altMapName].insert("attributes_label", attributeMapLabel);
|
362
|
362
|
mapAttributes[altMapName].insert("width", attrWidth);
|
363
|
363
|
mapAttributes[altMapName].insert("height", attrHeight);
|
|
@@ -372,6 +372,7 @@ void Project::readAllMapAttributes() {
|
372
|
372
|
}
|
373
|
373
|
}
|
374
|
374
|
|
|
375
|
+ // Deep copy
|
375
|
376
|
mapAttributesMaster = mapAttributes;
|
376
|
377
|
mapAttributesMaster.detach();
|
377
|
378
|
}
|
|
@@ -687,6 +688,7 @@ void Project::saveMap(Map *map) {
|
687
|
688
|
void Project::updateMapAttributes(Map* map) {
|
688
|
689
|
mapAttributesTableMaster.insert(map->index.toInt(nullptr, 0), map->name);
|
689
|
690
|
|
|
691
|
+ // Deep copy
|
690
|
692
|
QMap<QString, QString> attrs = mapAttributes.value(map->name);
|
691
|
693
|
attrs.detach();
|
692
|
694
|
mapAttributesMaster.insert(map->name, attrs);
|