Fix re-opening GRF/script settings windows not closing drop down windows

Causing assertion failure on drop down item selection

See: #527
This commit is contained in:
Jonathan G Rennison
2023-06-01 21:08:12 +01:00
parent e3bd8966fc
commit 58c0aac15f
3 changed files with 11 additions and 0 deletions

View File

@@ -325,6 +325,11 @@ struct ScriptSettingsWindow : public Window {
this->RebuildVisibleSettings();
}
~ScriptSettingsWindow()
{
HideDropDownMenu(this);
}
/**
* Rebuilds the list of visible settings. AI settings with the flag
* AICONFIG_AI_DEVELOPER set will only be visible if the game setting