mirror of
https://github.com/huderlem/porymap.git
synced 2026-04-24 14:57:08 -05:00
Reduce diff noise when saving maps
This commit is contained in:
parent
52a900b85d
commit
be02424f1c
|
|
@ -35,6 +35,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
|
|||
- `Export Map Stitch Image` now shows a preview of the full image, not just the current map.
|
||||
- Maps and layouts were internally separated.
|
||||
- Unrecognized map names in Event or Connections data will no longer be overwritten.
|
||||
- Reduced diff noise when saving maps.
|
||||
- Map names and ``MAP_NAME`` constants are no longer required to match.
|
||||
- Porymap will no longer overwrite ``include/constants/map_groups.h`` or ``include/constants/layouts.h``.
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,10 @@ static void dump(const QString &value, QString &out, int *indent, bool isKey = f
|
|||
static void dump(const Json::array &values, QString &out, int *indent) {
|
||||
bool first = true;
|
||||
if (!out.endsWith(": ")) out += QString(*indent * 2, ' ');
|
||||
if (values.empty()) {
|
||||
out += "[]";
|
||||
return;
|
||||
}
|
||||
out += "[\n";
|
||||
*indent += 1;
|
||||
for (const auto &value : values) {
|
||||
|
|
|
|||
|
|
@ -1297,7 +1297,7 @@ void Project::saveMap(Map *map) {
|
|||
}
|
||||
mapObj["connections"] = connectionsArr;
|
||||
} else {
|
||||
mapObj["connections"] = QJsonValue::Null;
|
||||
mapObj["connections"] = OrderedJson();
|
||||
}
|
||||
|
||||
if (map->sharedEventsMap().isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user