diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ee96b8d..91400820 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d - Fix text boxes in the Palette Editor calculating color incorrectly. - Fix default object sprites retaining dimensions and transparency of the previous sprite. - Fix connections not being deleted when the map name text box is cleared. +- Fix the map border not updating when a tileset is changed. ## [5.1.1] - 2023-02-20 ### Added diff --git a/src/editor.cpp b/src/editor.cpp index 76124324..23234b87 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -1918,6 +1918,7 @@ void Editor::updatePrimaryTileset(QString tilesetLabel, bool forceLoad) { map->layout->tileset_primary_label = tilesetLabel; map->layout->tileset_primary = project->getTileset(tilesetLabel, forceLoad); + map->clearBorderCache(); } } @@ -1927,6 +1928,7 @@ void Editor::updateSecondaryTileset(QString tilesetLabel, bool forceLoad) { map->layout->tileset_secondary_label = tilesetLabel; map->layout->tileset_secondary = project->getTileset(tilesetLabel, forceLoad); + map->clearBorderCache(); } } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4775d15b..52f210aa 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2385,10 +2385,8 @@ void MainWindow::onTilesetsSaved(QString primaryTilesetLabel, QString secondaryT } else { this->editor->project->getTileset(secondaryTilesetLabel, true); } - if (updated) { - this->editor->map->clearBorderCache(); + if (updated) redrawMapScene(); - } } void MainWindow::onWildMonDataChanged() {