1
0
Fork 0

Fix #14107: Invalidate all shared vehicle windows when changing group. (#14110)

Previously only windows of the first vehicle were invalidated.
pull/14112/head
Peter Nelson 2025-04-26 11:49:41 +01:00 committed by GitHub
parent bb1d561369
commit a1f086e60c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -515,6 +515,9 @@ static void AddVehicleToGroup(Vehicle *v, GroupID new_g)
break;
}
InvalidateWindowData(WC_VEHICLE_VIEW, v->index);
InvalidateWindowData(WC_VEHICLE_DETAILS, v->index);
GroupStatistics::CountVehicle(v, 1);
}
@ -572,10 +575,6 @@ std::tuple<CommandCost, GroupID> CmdAddVehicleGroup(DoCommandFlags flags, GroupI
}
SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
InvalidateWindowData(WC_VEHICLE_VIEW, v->index);
InvalidateWindowData(WC_VEHICLE_DETAILS, v->index);
}
GroupStatistics::UpdateAutoreplace(_current_company);