diff options
author | rubidium <rubidium@openttd.org> | 2008-11-18 23:53:37 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-11-18 23:53:37 +0000 |
commit | 2ed3c27822109d7c28422b0a61dbab06a8f7be4c (patch) | |
tree | 218a482fce834fe95fda7471c7dc81ddd9dddf8c /src/timetable_gui.cpp | |
parent | 07e3c096b3b744ef1d094c9481faa31ec8d2034a (diff) | |
download | openttd-2ed3c27822109d7c28422b0a61dbab06a8f7be4c.tar.xz |
(svn r14592) -Feature [FS#1124]: non-destructive autofill with option to keep waiting times (PhilSophus)
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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(); |