Fix closing build waypoint window not closing waypoint selection window

This commit is contained in:
Jonathan G Rennison
2023-05-25 22:50:57 +01:00
parent a419674157
commit 0b9b080aa6
2 changed files with 12 additions and 0 deletions

View File

@@ -521,6 +521,7 @@ struct BuildRailToolbarWindow : Window {
if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) SetViewportCatchmentStation(nullptr, true);
if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) SetViewportCatchmentWaypoint(nullptr, true);
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
DeleteWindowById(WC_SELECT_STATION, 0);
}
/**
@@ -2409,6 +2410,11 @@ struct BuildRailWaypointWindow : PickerWindowBase {
matrix->SetClicked(_cur_waypoint_type);
}
virtual ~BuildRailWaypointWindow()
{
DeleteWindowById(WC_SELECT_STATION, 0);
}
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
{
switch (widget) {