summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 9da03c143..c559702e7 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -2043,8 +2043,15 @@ public:
switch (widget) {
case VVW_WIDGET_START_STOP_VEH: // start stop
- DoCommandP(v->tile, v->index, 0,
- _vehicle_command_translation_table[VCT_CMD_START_STOP][v->type]);
+ if (_ctrl_pressed) {
+ /* Scroll to current order destination */
+ TileIndex tile = v->current_order.GetLocation(v);
+ if (tile != INVALID_TILE) ScrollMainWindowToTile(tile);
+ } else {
+ /* Start/Stop */
+ DoCommandP(v->tile, v->index, 0,
+ _vehicle_command_translation_table[VCT_CMD_START_STOP][v->type]);
+ }
break;
case VVW_WIDGET_CENTER_MAIN_VIEH: {// center main view
const Window *mainwindow = FindWindowById(WC_MAIN_WINDOW, 0);