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:
@@ -113,6 +113,7 @@ struct GSConfigWindow : public Window {
|
||||
|
||||
~GSConfigWindow()
|
||||
{
|
||||
HideDropDownMenu(this);
|
||||
DeleteWindowByClass(WC_SCRIPT_LIST);
|
||||
}
|
||||
|
||||
|
@@ -183,6 +183,11 @@ struct NewGRFParametersWindow : public Window {
|
||||
this->InvalidateData();
|
||||
}
|
||||
|
||||
~NewGRFParametersWindow()
|
||||
{
|
||||
HideDropDownMenu(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a dummy parameter-info object with default information.
|
||||
* @param nr The param number that should be changed.
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user