Changeset - r28271:d65cd0edb053
[Not reviewed]
master
0 1 0
Peter Nelson - 12 months ago 2023-12-09 20:57:26
peter1138@openttd.org
Codechange: Simplify BuildRailStationWindow initialization.
1 file changed with 4 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/rail_gui.cpp
Show inline comments
 
@@ -974,14 +974,10 @@ public:
 
		_railstation.newstations = newstation;
 

	
 
		this->CreateNestedTree();
 
		NWidgetStacked *newst_additions = this->GetWidget<NWidgetStacked>(WID_BRAS_SHOW_NEWST_ADDITIONS);
 
		newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		newst_additions = this->GetWidget<NWidgetStacked>(WID_BRAS_SHOW_NEWST_MATRIX);
 
		newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		newst_additions = this->GetWidget<NWidgetStacked>(WID_BRAS_SHOW_NEWST_DEFSIZE);
 
		newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		newst_additions = this->GetWidget<NWidgetStacked>(WID_BRAS_SHOW_NEWST_RESIZE);
 
		newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		this->GetWidget<NWidgetStacked>(WID_BRAS_SHOW_NEWST_ADDITIONS)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		this->GetWidget<NWidgetStacked>(WID_BRAS_SHOW_NEWST_MATRIX)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		this->GetWidget<NWidgetStacked>(WID_BRAS_SHOW_NEWST_DEFSIZE)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		this->GetWidget<NWidgetStacked>(WID_BRAS_SHOW_NEWST_RESIZE)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		/* Hide the station class filter if no stations other than the default one are available. */
 
		this->GetWidget<NWidgetStacked>(WID_BRAS_FILTER_CONTAINER)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
 
		if (newstation) {
0 comments (0 inline, 0 general)