From c8e60833ca07e7d0b739ad9237ab063c517e0895 Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Wed, 26 Jun 2024 12:24:12 -0400 Subject: [PATCH] Change: In the Editor, sync town layout setting with found towns buttons --- src/town_gui.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 3d3cc587bf..656b4efd13 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -1280,6 +1280,11 @@ public: case WID_TF_LAYOUT_ORIGINAL: case WID_TF_LAYOUT_BETTER: case WID_TF_LAYOUT_GRID2: case WID_TF_LAYOUT_GRID3: case WID_TF_LAYOUT_RANDOM: this->town_layout = (TownLayout)(widget - WID_TF_LAYOUT_ORIGINAL); + + /* If we are in the editor, sync the settings of the current game to the chosen layout, + * so that importing towns from file uses the selected layout. */ + if (_game_mode == GM_EDITOR) _settings_game.economy.town_layout = this->town_layout; + this->UpdateButtons(false); break; }