Codechange: Simplify BuildRailStationWindow initialization.

wip-string
Peter Nelson 6 months ago committed by Peter Nelson
parent 66b064cbad
commit fb60f8f2f5

@ -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) {

Loading…
Cancel
Save