Fix closing build waypoint window not closing waypoint selection window
This commit is contained in:
@@ -521,6 +521,7 @@ struct BuildRailToolbarWindow : Window {
|
|||||||
if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) SetViewportCatchmentStation(nullptr, true);
|
if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) SetViewportCatchmentStation(nullptr, true);
|
||||||
if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) SetViewportCatchmentWaypoint(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);
|
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);
|
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
|
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||||
{
|
{
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
|
@@ -381,6 +381,7 @@ struct BuildRoadToolbarWindow : Window {
|
|||||||
if (_game_mode == GM_NORMAL && (this->IsWidgetLowered(WID_ROT_BUS_STATION) || this->IsWidgetLowered(WID_ROT_TRUCK_STATION))) SetViewportCatchmentStation(nullptr, true);
|
if (_game_mode == GM_NORMAL && (this->IsWidgetLowered(WID_ROT_BUS_STATION) || this->IsWidgetLowered(WID_ROT_TRUCK_STATION))) SetViewportCatchmentStation(nullptr, true);
|
||||||
if (_game_mode == GM_NORMAL && this->IsWidgetLowered(WID_ROT_BUILD_WAYPOINT)) SetViewportCatchmentWaypoint(nullptr, true);
|
if (_game_mode == GM_NORMAL && this->IsWidgetLowered(WID_ROT_BUILD_WAYPOINT)) SetViewportCatchmentWaypoint(nullptr, true);
|
||||||
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
|
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
|
||||||
|
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1943,6 +1944,11 @@ struct BuildRoadWaypointWindow : PickerWindowBase {
|
|||||||
matrix->SetClicked(_cur_waypoint_type);
|
matrix->SetClicked(_cur_waypoint_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~BuildRoadWaypointWindow()
|
||||||
|
{
|
||||||
|
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||||
{
|
{
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
|
Reference in New Issue
Block a user