Fix departure GUI not updating when mode changed when paused
Fix buttons not being re-drawn when ctrl-clicking transport type buttons
This commit is contained in:
@@ -216,6 +216,7 @@ public:
|
|||||||
this->show_types[w - WID_DB_SHOW_TRAINS] = false;
|
this->show_types[w - WID_DB_SHOW_TRAINS] = false;
|
||||||
this->RaiseWidget(w);
|
this->RaiseWidget(w);
|
||||||
}
|
}
|
||||||
|
this->SetWidgetDirty(w);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this->show_types[widget - WID_DB_SHOW_TRAINS] = !this->show_types[widget - WID_DB_SHOW_TRAINS];
|
this->show_types[widget - WID_DB_SHOW_TRAINS] = !this->show_types[widget - WID_DB_SHOW_TRAINS];
|
||||||
@@ -225,11 +226,12 @@ public:
|
|||||||
else {
|
else {
|
||||||
this->RaiseWidget(widget);
|
this->RaiseWidget(widget);
|
||||||
}
|
}
|
||||||
|
this->SetWidgetDirty(widget);
|
||||||
}
|
}
|
||||||
/* 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. */
|
||||||
this->SetWidgetDirty(widget);
|
if (_pause_mode != PM_UNPAUSED) this->OnGameTick();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,6 +263,7 @@ public:
|
|||||||
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. */
|
||||||
this->SetWidgetDirty(widget);
|
this->SetWidgetDirty(widget);
|
||||||
|
if (_pause_mode != PM_UNPAUSED) this->OnGameTick();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_DB_LIST: { // Matrix to show departures
|
case WID_DB_LIST: { // Matrix to show departures
|
||||||
@@ -307,10 +310,12 @@ public:
|
|||||||
|
|
||||||
case WID_DB_SHOW_PAX:
|
case WID_DB_SHOW_PAX:
|
||||||
this->ToggleCargoFilter(widget, this->show_pax);
|
this->ToggleCargoFilter(widget, this->show_pax);
|
||||||
|
if (_pause_mode != PM_UNPAUSED) this->OnGameTick();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_DB_SHOW_FREIGHT:
|
case WID_DB_SHOW_FREIGHT:
|
||||||
this->ToggleCargoFilter(widget, this->show_freight);
|
this->ToggleCargoFilter(widget, this->show_freight);
|
||||||
|
if (_pause_mode != PM_UNPAUSED) this->OnGameTick();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user