diff options
author | stormcone <48624099+stormcone@users.noreply.github.com> | 2019-10-23 23:48:20 +0200 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-12-23 18:04:10 +0000 |
commit | fea5151ee1ec26a96034c4b34ffe2c7ae783299a (patch) | |
tree | 3b6cea3d8d9f2c986f62e6184903fafacc0d2683 | |
parent | 798e9ee93e1189586d72201abab7caccc3fb6bdc (diff) | |
download | openttd-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.
-rw-r--r-- | src/vehicle_gui.cpp | 8 |
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; } |