From 6c82322d323aef216af4a93b770706a09451c4a2 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 30 Oct 2020 20:49:43 +0000 Subject: [PATCH] Timetable: Fix clearing travel time clearing wait time instead --- src/timetable_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 7d0b9c6e6b..76e7f4c6e6 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -808,8 +808,8 @@ struct TimetableWindow : Window { break; } - case WID_VT_CLEAR_TIME: { // Clear waiting time. - ExecuteTimetableCommand(v, _ctrl_pressed, this->sel_index, MTF_WAIT_TIME, 0, true); + case WID_VT_CLEAR_TIME: { // Clear travel/waiting time. + ExecuteTimetableCommand(v, _ctrl_pressed, this->sel_index, (this->sel_index % 2 == 1) ? MTF_TRAVEL_TIME : MTF_WAIT_TIME, 0, true); break; }