mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: Simplify BuildRailStationWindow initialization.
This commit is contained in:
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…
Reference in New Issue