From 2ed3c27822109d7c28422b0a61dbab06a8f7be4c Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 18 Nov 2008 23:53:37 +0000 Subject: (svn r14592) -Feature [FS#1124]: non-destructive autofill with option to keep waiting times (PhilSophus) --- src/timetable_gui.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/timetable_gui.cpp') diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 813354874..f2cd24d1b 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -301,9 +301,12 @@ struct TimetableWindow : Window { DoCommandP(0, v->index, 0, NULL, CMD_SET_VEHICLE_ON_TIME | CMD_MSG(STR_CAN_T_TIMETABLE_VEHICLE)); break; - case TTV_AUTOFILL: /* Autofill the timetable. */ - DoCommandP(0, v->index, HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE) ? 0 : 1, NULL, CMD_AUTOFILL_TIMETABLE | CMD_MSG(STR_CAN_T_TIMETABLE_VEHICLE)); - break; + case TTV_AUTOFILL: { /* Autofill the timetable. */ + uint32 p2 = 0; + if (!HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE)) SetBit(p2, 0); + if (_ctrl_pressed) SetBit(p2, 1); + DoCommandP(0, v->index, p2, NULL, CMD_AUTOFILL_TIMETABLE | CMD_MSG(STR_CAN_T_TIMETABLE_VEHICLE)); + } break; } this->SetDirty(); -- cgit v1.2.3-70-g09d2