Change window close/deallocation to match upstream

This commit is contained in:
Jonathan G Rennison
2023-09-15 23:56:33 +01:00
parent 79cfc3e8bd
commit f5d1b1d8f8
50 changed files with 352 additions and 341 deletions

View File

@@ -78,10 +78,11 @@ struct BuildAirToolbarWindow : Window {
this->last_user_action = WIDGET_LIST_END;
}
~BuildAirToolbarWindow()
void Close() override
{
if (this->IsWidgetLowered(WID_AT_AIRPORT)) SetViewportCatchmentStation(nullptr, true);
if (_settings_client.gui.link_terraform_toolbar) CloseWindowById(WC_SCEN_LAND_GEN, 0, false);
this->Window::Close();
}
/**
@@ -278,9 +279,10 @@ public:
if (selectFirstAirport) this->SelectFirstAvailableAirport(true);
}
virtual ~BuildAirportWindow()
void Close() override
{
CloseWindowById(WC_SELECT_STATION, 0);
this->PickerWindowBase::Close();
}
void SetStringParameters(int widget) const override