diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/timetable_cmd.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 101221216..0db355978 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -31,7 +31,9 @@ static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint16 time } } - InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index); + for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) { + InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index); + } } /** @@ -134,6 +136,10 @@ CommandCost CmdAutofillTimetable(TileIndex tile, uint32 flags, uint32 p1, uint32 } } + for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) { + InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index); + } + return CommandCost(); } @@ -178,5 +184,7 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling) v->lateness_counter -= (timetabled - time_taken); - InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index); + for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) { + InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index); + } } |