Changeset - r7809:a8c0806e350f
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-10-30 17:57:51
rubidium@openttd.org
(svn r11359) -Fix [FS#1381]: shared timetables were not properly refreshed with autofill.
1 file changed with 10 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/timetable_cmd.cpp
Show inline comments
 
@@ -31,7 +31,9 @@ static void ChangeTimetable(Vehicle *v, 
 
		}
 
	}
 

	
 
	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(TileInd
 
		}
 
	}
 

	
 
	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, 
 

	
 
	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);
 
	}
 
}
0 comments (0 inline, 0 general)