diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 224eb51643..13620db689 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -974,14 +974,10 @@ public: _railstation.newstations = newstation; this->CreateNestedTree(); - NWidgetStacked *newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_ADDITIONS); - newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); - newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_MATRIX); - newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); - newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_DEFSIZE); - newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); - newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_RESIZE); - newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); + this->GetWidget(WID_BRAS_SHOW_NEWST_ADDITIONS)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); + this->GetWidget(WID_BRAS_SHOW_NEWST_MATRIX)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); + this->GetWidget(WID_BRAS_SHOW_NEWST_DEFSIZE)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); + this->GetWidget(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(WID_BRAS_FILTER_CONTAINER)->SetDisplayedPlane(newstation ? 0 : SZSP_NONE); if (newstation) {