From 56d53d26930dea069a55d75a9a1217f6aabe8d41 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 30 Sep 2023 18:39:14 -0400 Subject: [PATCH] Relax spacing requirements in heal location data table --- CHANGELOG.md | 1 + src/project.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 298ebf1d..9d067e60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d - Stop the Tileset Editor from scrolling to the initially selected metatile when saving. - Fix `0x0`/`NULL` appearing more than once in the scripts dropdown. - Fix the selection outline sticking in single-tile mode on the Prefab tab. +- Fix heal location data being cleared if certain spaces aren't used in the table. - Fix bad URL color contrast on dark themes. ## [5.1.1] - 2023-02-20 diff --git a/src/project.cpp b/src/project.cpp index 588d0ee4..422c09c5 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -2025,7 +2025,7 @@ bool Project::readHealLocations() { for (const auto idName : constants) { // Create regex pattern for e.g. "SPAWN_PALLET_TOWN - 1] = " - const QString initializerPattern = QString("%1\\s*- 1\\]\\s* = ").arg(idName); + const QString initializerPattern = QString("%1\\s*-\\s*1\\s*\\]\\s*=\\s*").arg(idName); // Expression for location data, e.g. "SPAWN_PALLET_TOWN - 1] = {MAP_GROUP(PALLET_TOWN), MAP_NUM(PALLET_TOWN), x, y}" QRegularExpression locationRegex(QString("%1\\{%2,%3}").arg(initializerPattern).arg(mapPattern).arg(coordPattern));