Skip to content

Commit

Permalink
Fix: Read map UserData from JSON map files (#6191)
Browse files Browse the repository at this point in the history
* Read map UserData from JSON map files

* Fix formatting

* Update src/TMap.cpp

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
  • Loading branch information
keneanung and SlySven committed Aug 1, 2022
1 parent 4ae81c7 commit 2c0cc5b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/TMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3096,6 +3096,9 @@ std::pair<bool, QString> TMap::readJsonMapFile(const QString& source, const bool

mDefaultAreaName = mapObj[QLatin1String("defaultAreaName")].toString();
mUnnamedAreaName = mapObj[QLatin1String("anonymousAreaName")].toString();
if (mapObj.contains(QLatin1String("userData"))) {
readJsonUserData(mapObj[QLatin1String("userData")].toObject());
}
QString mapSymbolFontText = mapObj[QLatin1String("mapSymbolFontDetails")].toString();
float mapSymbolFontFudgeFactor = (qRound(mapObj[QLatin1String("mapSymbolFontFudgeFactor")].toDouble() * 1000.0)) / 1000;
bool isOnlyMapSymbolFontToBeUsed = mapObj[QLatin1String("onlyMapSymbolFontToBeUsed")].toBool();
Expand Down

0 comments on commit 2c0cc5b

Please sign in to comment.