Codechange: do not hide variables with other variables

This commit is contained in:
rubidium42
2023-01-28 20:06:51 +01:00
committed by rubidium42
parent 1951af07c0
commit 6ba55e663e
30 changed files with 137 additions and 146 deletions

View File

@@ -3226,8 +3226,8 @@ public:
}
/* The same system applies to widget WID_VV_REFIT_VEH and VVW_WIDGET_TURN_AROUND.*/
if (v->IsGroundVehicle()) {
PlaneSelections plane = veh_stopped ? SEL_RT_REFIT : SEL_RT_TURN_AROUND;
NWidgetStacked *nwi = this->GetWidget<NWidgetStacked>(WID_VV_SELECT_REFIT_TURN);
plane = veh_stopped ? SEL_RT_REFIT : SEL_RT_TURN_AROUND;
nwi = this->GetWidget<NWidgetStacked>(WID_VV_SELECT_REFIT_TURN);
if (nwi->shown_plane + SEL_RT_BASEPLANE != plane) {
this->SelectPlane(plane);
this->SetWidgetDirty(WID_VV_SELECT_REFIT_TURN);