(svn r11359) -Fix [FS#1381]: shared timetables were not properly refreshed with autofill.

This commit is contained in:
rubidium 2007-10-30 17:57:51 +00:00
parent b98b97cfb4
commit 554d7d924a
1 changed files with 10 additions and 2 deletions

View File

@ -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);
}
}