(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)
authorbjarni
Tue, 07 Aug 2007 23:07:10 +0000
changeset 7425 d9bc116f2f54
parent 7424 40212c733e38
child 7426 e8dd555767bd
(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)
src/aircraft_cmd.cpp
src/roadveh_cmd.cpp
src/ship_cmd.cpp
src/train_cmd.cpp
--- a/src/aircraft_cmd.cpp	Tue Aug 07 20:42:02 2007 +0000
+++ b/src/aircraft_cmd.cpp	Tue Aug 07 23:07:10 2007 +0000
@@ -452,7 +452,7 @@
 		RebuildVehicleLists();
 		InvalidateWindow(WC_COMPANY, v->owner);
 		if (IsLocalPlayer())
-			InvalidateAutoreplaceWindow(VEH_AIRCRAFT, v->group_id); //updates the replace Aircraft window
+			InvalidateAutoreplaceWindow(v->engine_type, v->group_id); //updates the replace Aircraft window
 
 		GetPlayer(_current_player)->num_engines[p1]++;
 	}
--- a/src/roadveh_cmd.cpp	Tue Aug 07 20:42:02 2007 +0000
+++ b/src/roadveh_cmd.cpp	Tue Aug 07 23:07:10 2007 +0000
@@ -270,7 +270,7 @@
 		RebuildVehicleLists();
 		InvalidateWindow(WC_COMPANY, v->owner);
 		if (IsLocalPlayer())
-			InvalidateAutoreplaceWindow(VEH_ROAD, v->group_id); // updates the replace Road window
+			InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Road window
 
 		GetPlayer(_current_player)->num_engines[p1]++;
 	}
--- a/src/ship_cmd.cpp	Tue Aug 07 20:42:02 2007 +0000
+++ b/src/ship_cmd.cpp	Tue Aug 07 23:07:10 2007 +0000
@@ -897,7 +897,7 @@
 		RebuildVehicleLists();
 		InvalidateWindow(WC_COMPANY, v->owner);
 		if (IsLocalPlayer())
-			InvalidateAutoreplaceWindow(VEH_SHIP, v->group_id); // updates the replace Ship window
+			InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Ship window
 
 		GetPlayer(_current_player)->num_engines[p1]++;
 
--- a/src/train_cmd.cpp	Tue Aug 07 20:42:02 2007 +0000
+++ b/src/train_cmd.cpp	Tue Aug 07 23:07:10 2007 +0000
@@ -588,7 +588,7 @@
 
 			InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
 			if (IsLocalPlayer()) {
-				InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
+				InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
 			}
 			GetPlayer(_current_player)->num_engines[engine]++;
 		}
@@ -772,7 +772,7 @@
 			RebuildVehicleLists();
 			InvalidateWindow(WC_COMPANY, v->owner);
 			if (IsLocalPlayer())
-				InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
+				InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
 
 			GetPlayer(_current_player)->num_engines[p1]++;
 		}