Feature: Ctrl-Clicking GB_SHARED_ORDERS vehicle list opens order window

This commit is contained in:
Bernard Teo
2021-05-31 15:59:17 +08:00
committed by Patric Stout
parent ff6c934916
commit 6a6dbbaad2
2 changed files with 19 additions and 12 deletions

View File

@@ -1843,10 +1843,14 @@ public:
const Vehicle *v = vehgroup.vehicles_begin[0];
/* We do not support VehicleClicked() here since the contextual action may only make sense for individual vehicles */
if (vehgroup.NumVehicles() == 1) {
ShowVehicleViewWindow(v);
if (_ctrl_pressed) {
ShowOrdersWindow(v);
} else {
ShowVehicleListWindow(v);
if (vehgroup.NumVehicles() == 1) {
ShowVehicleViewWindow(v);
} else {
ShowVehicleListWindow(v);
}
}
break;
}