src/train_cmd.cpp
changeset 9297 1cb8d7bbdc8a
parent 9274 42b67e65f1c2
child 9321 61fd5b6e27ce
--- a/src/train_cmd.cpp	Sun May 18 14:12:16 2008 +0000
+++ b/src/train_cmd.cpp	Sun May 18 16:51:44 2008 +0000
@@ -803,7 +803,7 @@
 			}
 
 			InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
-			RebuildVehicleLists();
+			InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
 			InvalidateWindow(WC_COMPANY, v->owner);
 			if (IsLocalPlayer()) {
 				InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
@@ -1272,7 +1272,7 @@
 			InvalidateWindow(WC_VEHICLE_DEPOT, dst_head->tile);
 		}
 
-		RebuildVehicleLists();
+		InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
 	}
 
 	return CommandCost();
@@ -1353,7 +1353,7 @@
 			DeleteWindowById(WC_VEHICLE_VIEW, first->index);
 		}
 		InvalidateWindow(WC_VEHICLE_DEPOT, first->tile);
-		RebuildVehicleLists();
+		InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
 	}
 
 	CommandCost cost(EXPENSES_NEW_VEHICLES);
@@ -2001,7 +2001,7 @@
 					v->cargo_subtype = new_subtype;
 					InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 					InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
-					RebuildVehicleLists();
+					InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
 				}
 			}
 		}
@@ -2805,7 +2805,7 @@
 		InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
 	}
 
-	RebuildVehicleLists();
+	InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
 
 	BEGIN_ENUM_WAGONS(v)
 		v->vehstatus |= VS_CRASHED;
@@ -3152,7 +3152,7 @@
 		}
 	}
 
-	RebuildVehicleLists();
+	InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
 
 	MarkSingleVehicleDirty(v);