(svn r11359) -Fix [FS#1381]: shared timetables were not properly refreshed with autofill.
authorrubidium
Tue, 30 Oct 2007 17:57:51 +0000
changeset 8305 c8b7592ae94b
parent 8304 eb927ead85bf
child 8306 e3f8ee5113ed
(svn r11359) -Fix [FS#1381]: shared timetables were not properly refreshed with autofill.
src/timetable_cmd.cpp
--- a/src/timetable_cmd.cpp	Tue Oct 30 17:24:04 2007 +0000
+++ b/src/timetable_cmd.cpp	Tue Oct 30 17:57:51 2007 +0000
@@ -31,7 +31,9 @@
 		}
 	}
 
-	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 @@
 		}
 	}
 
+	for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) {
+		InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
+	}
+
 	return CommandCost();
 }
 
@@ -178,5 +184,7 @@
 
 	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);
+	}
 }