Feature: Contextual actions for vehicles grouped by shared orders (#8425)

This commit is contained in:
Bernard Teo
2022-11-27 01:03:21 +08:00
committed by GitHub
parent 5e14a20b3b
commit 8a78fa7121
9 changed files with 200 additions and 19 deletions

View File

@@ -884,14 +884,14 @@ public:
}
case GB_SHARED_ORDERS: {
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 (vindex == v->index) {
if (vehgroup.NumVehicles() == 1) {
ShowVehicleViewWindow(v);
} else {
ShowVehicleListWindow(v);
if (!VehicleClicked(vehgroup)) {
const Vehicle* v = vehgroup.vehicles_begin[0];
if (vindex == v->index) {
if (vehgroup.NumVehicles() == 1) {
ShowVehicleViewWindow(v);
} else {
ShowVehicleListWindow(v);
}
}
}
break;