mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
Fix crash when opening tram road stop build window
See: https://github.com/OpenTTD/OpenTTD/issues/12166
This commit is contained in:
parent
0fbb32403c
commit
0978bd18bf
@ -1262,9 +1262,11 @@ private:
|
||||
const RoadStopSpec *spec = RoadStopClass::Get(_roadstop_gui_settings.roadstop_class)->GetSpec(_roadstop_gui_settings.roadstop_type);
|
||||
|
||||
/* Raise and lower to ensure the correct widget is lowered after changing displayed orientation plane. */
|
||||
this->RaiseWidget(WID_BROS_STATION_NE + _roadstop_gui_settings.orientation);
|
||||
this->GetWidget<NWidgetStacked>(WID_BROS_AVAILABLE_ORIENTATIONS)->SetDisplayedPlane((spec != nullptr && HasBit(spec->flags, RSF_DRIVE_THROUGH_ONLY)) ? 1 : 0);
|
||||
this->LowerWidget(WID_BROS_STATION_NE + _roadstop_gui_settings.orientation);
|
||||
if (RoadTypeIsRoad(_cur_roadtype)) {
|
||||
this->RaiseWidget(WID_BROS_STATION_NE + _roadstop_gui_settings.orientation);
|
||||
this->GetWidget<NWidgetStacked>(WID_BROS_AVAILABLE_ORIENTATIONS)->SetDisplayedPlane((spec != nullptr && HasBit(spec->flags, RSF_DRIVE_THROUGH_ONLY)) ? 1 : 0);
|
||||
this->LowerWidget(WID_BROS_STATION_NE + _roadstop_gui_settings.orientation);
|
||||
}
|
||||
|
||||
if (_roadstop_gui_settings.orientation >= DIAGDIR_END) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user