summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorstormcone <48624099+stormcone@users.noreply.github.com>2019-10-23 23:48:20 +0200
committerCharles Pigott <charlespigott@googlemail.com>2019-12-23 18:04:10 +0000
commitfea5151ee1ec26a96034c4b34ffe2c7ae783299a (patch)
tree3b6cea3d8d9f2c986f62e6184903fafacc0d2683 /src
parent798e9ee93e1189586d72201abab7caccc3fb6bdc (diff)
downloadopenttd-fea5151ee1ec26a96034c4b34ffe2c7ae783299a.tar.xz
Feature: Control + clicking on a vehicle in the vehicle list window opens the vehicle group window focused on the vehicle's group.
Diffstat (limited to 'src')
-rw-r--r--src/vehicle_gui.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 6272459bc..bd38ea26a 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1625,7 +1625,13 @@ public:
if (id_v >= this->vehicles.size()) return; // click out of list bound
const Vehicle *v = this->vehicles[id_v];
- if (!VehicleClicked(v)) ShowVehicleViewWindow(v);
+ if (!VehicleClicked(v)) {
+ if (_ctrl_pressed) {
+ ShowCompanyGroupForVehicle(v);
+ } else {
+ ShowVehicleViewWindow(v);
+ }
+ }
break;
}