diff --git a/CHANGELOG.md b/CHANGELOG.md index c4b6aa00..bcb2a256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project somewhat adheres to [Semantic Versioning](https://semver.org/sp - The scale of the map can now be changed while resizing the map. ### Fixed +- Fix duplicated maps writing the wrong name. - Fix small maps being difficult to see while resizing. ## [6.0.0] - 2025-05-26 diff --git a/src/project.cpp b/src/project.cpp index eddb07a2..07ffef37 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -405,6 +405,10 @@ bool Project::loadMapData(Map* map) { } QJsonObject mapObj = mapDoc.object(); + QString name = ParseUtil::jsonToQString(mapObj.take("name")); + if (name != map->name()) { + logWarn(QString("Mismatched name '%1' for map '%2' will be overwritten.").arg(name).arg(map->name())); + } // We should already know the map constant ID from the initial project launch, but we'll ensure it's correct here anyway. map->setConstantName(ParseUtil::jsonToQString(mapObj.take("id")));