Changeset - r25123:bceac5967dc2
[Not reviewed]
master
0 2 0
Bernard Teo - 3 years ago 2021-04-06 18:30:35
btzy1996@hotmail.com
Fix #8922: Show vehicle window for single vehicle in shared order grouping (#8926)
2 files changed with 13 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/group_gui.cpp
Show inline comments
 
@@ -892,7 +892,11 @@ public:
 
						/* We do not support VehicleClicked() here since the contextual action may only make sense for individual vehicles */
 

	
 
						if (vindex == v->index) {
 
							ShowVehicleListWindow(v);
 
							if (vehgroup.NumVehicles() == 1) {
 
								ShowVehicleViewWindow(v);
 
							} else {
 
								ShowVehicleListWindow(v);
 
							}
 
						}
 
						break;
 
					}
src/vehicle_gui.cpp
Show inline comments
 
@@ -1830,12 +1830,18 @@ public:
 
						break;
 
					}
 

	
 
					case GB_SHARED_ORDERS:
 
					case GB_SHARED_ORDERS: {
 
						assert(vehgroup.NumVehicles() > 0);
 
						const Vehicle *v = vehgroup.vehicles_begin[0];
 
						/* We do not support VehicleClicked() here since the contextual action may only make sense for individual vehicles */
 

	
 
						ShowVehicleListWindow(vehgroup.vehicles_begin[0]);
 
						if (vehgroup.NumVehicles() == 1) {
 
							ShowVehicleViewWindow(v);
 
						} else {
 
							ShowVehicleListWindow(v);
 
						}
 
						break;
 
					}
 

	
 
					default: NOT_REACHED();
 
				}
0 comments (0 inline, 0 general)