From ea12766834d951780479dadbe4e9f244e6a5eec0 Mon Sep 17 00:00:00 2001 From: phosit Date: Thu, 2 Oct 2025 10:57:33 +0200 Subject: [PATCH] Don't filter when a saved game is loading Filtering the maps sometimes changes the selection. Also it's not required to filter the maps as the setting is already selected and frozen. This reuses the code which is used by campains since there the map might also be frozen. Fixes: #7682 --- .../gui/gamesetup/Controllers/GameSettingsController.js | 2 +- .../GameSettings/Single/Dropdowns/MapSelection.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/binaries/data/mods/public/gui/gamesetup/Controllers/GameSettingsController.js b/binaries/data/mods/public/gui/gamesetup/Controllers/GameSettingsController.js index 63401dd1fd..cac2a5beeb 100644 --- a/binaries/data/mods/public/gui/gamesetup/Controllers/GameSettingsController.js +++ b/binaries/data/mods/public/gui/gamesetup/Controllers/GameSettingsController.js @@ -117,7 +117,7 @@ class GameSettingsController } for (const handler of this.settingsLoadedHandlers) - handler(); + handler(isSavedGame); this.updateLayout(); this.setNetworkInitAttributes(); diff --git a/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSelection.js b/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSelection.js index e2a4a2d8b4..3139fc045c 100644 --- a/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSelection.js +++ b/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSelection.js @@ -13,9 +13,9 @@ GameSettingControls.MapSelection = class MapSelection extends GameSettingControl }; } - onSettingsLoaded() + onSettingsLoaded(isSavedGame) { - if (this.gameSettingsController.guiData.lockSettings?.map) + if (this.gameSettingsController.guiData.lockSettings?.map || isSavedGame) { if (!g_GameSettings.map) {