mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-21 17:45:44 -05:00
Fix duplicated maps writing the wrong name
This commit is contained in:
parent
4816c1c8af
commit
560d204890
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user