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
This commit is contained in:
phosit 2025-10-02 10:57:33 +02:00 committed by Phosit
parent 3ae3c7ad3b
commit ea12766834
2 changed files with 3 additions and 3 deletions

View file

@ -117,7 +117,7 @@ class GameSettingsController
}
for (const handler of this.settingsLoadedHandlers)
handler();
handler(isSavedGame);
this.updateLayout();
this.setNetworkInitAttributes();

View file

@ -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)
{