Changeset - r23690:4f00d4fd22b8
[Not reviewed]
master
0 2 0
PeterN - 5 years ago 2019-04-29 18:09:11
peter1138@openttd.org
Fix 81d335b: Don't check state of widget not present in scenario editor. (#7551)
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/dock_gui.cpp
Show inline comments
 
@@ -105,7 +105,7 @@ struct BuildDocksToolbarWindow : Window 
 

	
 
	~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);
 
	}
 

	
 
@@ -249,7 +249,7 @@ struct BuildDocksToolbarWindow : Window 
 

	
 
	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();
 

	
src/road_gui.cpp
Show inline comments
 
@@ -327,7 +327,7 @@ struct BuildRoadToolbarWindow : Window {
 

	
 
	~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);
 
	}
 

	
 
@@ -546,7 +546,7 @@ struct BuildRoadToolbarWindow : Window {
 

	
 
	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->SetWidgetsDisabledState(true,
0 comments (0 inline, 0 general)