(svn r11359) -Fix [FS#1381]: shared timetables were not properly refreshed with autofill.
authorrubidium
Tue, 30 Oct 2007 17:57:51 +0000
changeset 7809 5711d0a71dba
parent 7808 07640f0ae961
child 7810 6b4a83fb86c8
(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);
+	}
 }