From 3cb5bfe1a958645608f9314af2429813340b0433 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 19 Jan 2019 19:05:05 +0000 Subject: [PATCH] Fix departure GUI not updating when mode changed when paused Fix buttons not being re-drawn when ctrl-clicking transport type buttons --- src/departures_gui.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/departures_gui.cpp b/src/departures_gui.cpp index 798a05f760..4bdf0f2e67 100644 --- a/src/departures_gui.cpp +++ b/src/departures_gui.cpp @@ -216,6 +216,7 @@ public: this->show_types[w - WID_DB_SHOW_TRAINS] = false; this->RaiseWidget(w); } + this->SetWidgetDirty(w); } } else { this->show_types[widget - WID_DB_SHOW_TRAINS] = !this->show_types[widget - WID_DB_SHOW_TRAINS]; @@ -225,11 +226,12 @@ public: else { this->RaiseWidget(widget); } + this->SetWidgetDirty(widget); } /* We need to recompute the departures list. */ this->calc_tick_countdown = 0; /* We need to redraw the button that was pressed. */ - this->SetWidgetDirty(widget); + if (_pause_mode != PM_UNPAUSED) this->OnGameTick(); break; } @@ -261,6 +263,7 @@ public: this->calc_tick_countdown = 0; /* We need to redraw the button that was pressed. */ this->SetWidgetDirty(widget); + if (_pause_mode != PM_UNPAUSED) this->OnGameTick(); break; case WID_DB_LIST: { // Matrix to show departures @@ -307,10 +310,12 @@ public: case WID_DB_SHOW_PAX: this->ToggleCargoFilter(widget, this->show_pax); + if (_pause_mode != PM_UNPAUSED) this->OnGameTick(); break; case WID_DB_SHOW_FREIGHT: this->ToggleCargoFilter(widget, this->show_freight); + if (_pause_mode != PM_UNPAUSED) this->OnGameTick(); break; } }