From 42b3c5fe25e9ea7ab95f3da2c194870799e7fdde Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 26 May 2023 19:38:17 +0100 Subject: [PATCH] Fix highlight of adjacent rail/road waypoints when only one waypoint type --- src/rail_gui.cpp | 5 +++++ src/road_gui.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index c9884de0ec..2fbf7746b5 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -932,6 +932,11 @@ struct BuildRailToolbarWindow : Window { return ES_NOT_HANDLED; } + void OnRealtimeTick(uint delta_ms) override + { + if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) CheckRedrawWaypointCoverage(this, false); + } + static HotkeyList hotkeys; }; diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 657bf88fc2..5e27cf69cc 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -847,6 +847,11 @@ struct BuildRoadToolbarWindow : Window { return ES_NOT_HANDLED; } + void OnRealtimeTick(uint delta_ms) override + { + if (this->IsWidgetLowered(WID_ROT_BUILD_WAYPOINT)) CheckRedrawWaypointCoverage(this, true); + } + static HotkeyList road_hotkeys; static HotkeyList tram_hotkeys; };