Departure boards: Fix "show via" widget needs redrawn when changed as a side effect of "show deps" toggled
This commit is contained in:
@@ -365,16 +365,19 @@ public:
|
|||||||
this->RaiseWidget(widget);
|
this->RaiseWidget(widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->departure_types[0]) {
|
/* Side effects */
|
||||||
this->RaiseWidget(WID_DB_SHOW_VIA);
|
if (widget == WID_DB_SHOW_DEPS) {
|
||||||
this->DisableWidget(WID_DB_SHOW_VIA);
|
if (!this->departure_types[0]) {
|
||||||
} else {
|
this->RaiseWidget(WID_DB_SHOW_VIA);
|
||||||
this->EnableWidget(WID_DB_SHOW_VIA);
|
this->DisableWidget(WID_DB_SHOW_VIA);
|
||||||
|
} else {
|
||||||
if (this->departure_types[2]) {
|
this->EnableWidget(WID_DB_SHOW_VIA);
|
||||||
this->LowerWidget(WID_DB_SHOW_VIA);
|
this->SetWidgetLoweredState(WID_DB_SHOW_VIA,this->departure_types[2]);
|
||||||
}
|
}
|
||||||
|
/* Redraw required. */
|
||||||
|
this->SetWidgetDirty(WID_DB_SHOW_VIA);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We need to recompute the departures list. */
|
/* We need to recompute the departures list. */
|
||||||
this->calc_tick_countdown = 0;
|
this->calc_tick_countdown = 0;
|
||||||
/* We need to redraw the button that was pressed. */
|
/* We need to redraw the button that was pressed. */
|
||||||
|
Reference in New Issue
Block a user