1
0
Fork 0

Codechange: Simply check whether the group vehicle list is empty for ToolbarVehicleClick

pull/10548/head
SamuXarick 2024-01-02 20:46:18 +00:00
parent afa050ed65
commit e9a4f865b0
1 changed files with 2 additions and 2 deletions

View File

@ -730,8 +730,8 @@ static void ToolbarVehicleClick(Window *w, VehicleType veh)
{
int dis = ~0;
for (const Vehicle *v : Vehicle::Iterate()) {
if (v->type == veh && v->IsPrimaryVehicle()) ClrBit(dis, v->owner);
for (const Company *c : Company::Iterate()) {
if (!c->group_all[veh].vehicle_list.empty()) ClrBit(dis, c->index);
}
PopupMainCompanyToolbMenu(w, WID_TN_VEHICLE_START + veh, dis);
}