src/train_gui.cpp
changeset 9297 1cb8d7bbdc8a
parent 9111 48ce04029fe4
child 9344 d3b1b1fbbad9
--- a/src/train_gui.cpp	Sun May 18 14:12:16 2008 +0000
+++ b/src/train_gui.cpp	Sun May 18 16:51:44 2008 +0000
@@ -18,6 +18,7 @@
 #include "order_func.h"
 #include "engine_func.h"
 #include "engine_base.h"
+#include "window_func.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
@@ -43,7 +44,7 @@
 		found = GetLastVehicleInChain(found);
 		/* put the new wagon at the end of the loco. */
 		DoCommandP(0, _new_vehicle_id | (found->index << 16), 0, NULL, CMD_MOVE_RAIL_VEHICLE);
-		RebuildVehicleLists();
+		InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
 	}
 }