diff --git a/src/road_gui.cpp b/src/road_gui.cpp --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -1451,7 +1451,7 @@ public: } case WID_BROS_IMAGE: { - uint16_t type = this->GetWidget(WID_BROS_MATRIX)->GetCurrentElement(); + uint16_t type = this->GetWidget(widget)->GetParentWidget()->GetCurrentElement(); assert(type < _roadstop_gui_settings.roadstop_count); const RoadStopSpec *spec = RoadStopClass::Get(_roadstop_gui_settings.roadstop_class)->GetSpec(type); @@ -1549,7 +1549,7 @@ public: } case WID_BROS_IMAGE: { - uint16_t y = this->GetWidget(WID_BROS_MATRIX)->GetCurrentElement(); + uint16_t y = this->GetWidget(widget)->GetParentWidget()->GetCurrentElement(); if (y >= _roadstop_gui_settings.roadstop_count) return; const RoadStopSpec *spec = RoadStopClass::Get(_roadstop_gui_settings.roadstop_class)->GetSpec(y); @@ -1559,7 +1559,7 @@ public: _roadstop_gui_settings.roadstop_type = y; - this->GetWidget(WID_BROS_MATRIX)->SetClicked(_roadstop_gui_settings.roadstop_type); + this->GetWidget(widget)->GetParentWidget()->SetClicked(_roadstop_gui_settings.roadstop_type); if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); this->SetDirty();