mirror of https://github.com/OpenTTD/OpenTTD
Fix 81d335b: Don't check state of widget not present in scenario editor. (#7551)
parent
8cc6ee60ed
commit
14dc8dd619
|
@ -105,7 +105,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||||
|
|
||||||
~BuildDocksToolbarWindow()
|
~BuildDocksToolbarWindow()
|
||||||
{
|
{
|
||||||
if (this->IsWidgetLowered(WID_DT_STATION)) SetViewportCatchmentStation(nullptr, true);
|
if (_game_mode != GM_EDITOR && this->IsWidgetLowered(WID_DT_STATION)) SetViewportCatchmentStation(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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||||
|
|
||||||
void OnPlaceObjectAbort() override
|
void OnPlaceObjectAbort() override
|
||||||
{
|
{
|
||||||
if (this->IsWidgetLowered(WID_DT_STATION)) SetViewportCatchmentStation(nullptr, true);
|
if (_game_mode != GM_EDITOR && this->IsWidgetLowered(WID_DT_STATION)) SetViewportCatchmentStation(nullptr, true);
|
||||||
|
|
||||||
this->RaiseButtons();
|
this->RaiseButtons();
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||||
|
|
||||||
~BuildRoadToolbarWindow()
|
~BuildRoadToolbarWindow()
|
||||||
{
|
{
|
||||||
if (this->IsWidgetLowered(WID_ROT_BUS_STATION) || this->IsWidgetLowered(WID_ROT_TRUCK_STATION)) SetViewportCatchmentStation(nullptr, true);
|
if (_game_mode != GM_EDITOR && (this->IsWidgetLowered(WID_ROT_BUS_STATION) || this->IsWidgetLowered(WID_ROT_TRUCK_STATION))) SetViewportCatchmentStation(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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||||
|
|
||||||
void OnPlaceObjectAbort() override
|
void OnPlaceObjectAbort() override
|
||||||
{
|
{
|
||||||
if (this->IsWidgetLowered(WID_ROT_BUS_STATION) || this->IsWidgetLowered(WID_ROT_TRUCK_STATION)) SetViewportCatchmentStation(nullptr, true);
|
if (_game_mode != GM_EDITOR && (this->IsWidgetLowered(WID_ROT_BUS_STATION) || this->IsWidgetLowered(WID_ROT_TRUCK_STATION))) SetViewportCatchmentStation(nullptr, true);
|
||||||
|
|
||||||
this->RaiseButtons();
|
this->RaiseButtons();
|
||||||
this->SetWidgetsDisabledState(true,
|
this->SetWidgetsDisabledState(true,
|
||||||
|
|
Loading…
Reference in New Issue