diff src/train_cmd.cpp @ 17303:9bb1535a33c0 draft

(svn r22043) -Fix: invalidate the right windows when a part of a train is flipped in the depot
author rubidium <rubidium@openttd.org>
date Wed, 09 Feb 2011 20:45:07 +0000
parents acb919c16a29
children aea54f56915d
line wrap: on
line diff
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1806,11 +1806,11 @@
 
 		if (flags & DC_EXEC) {
 			ToggleBit(v->flags, VRF_REVERSE_DIRECTION);
-			SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
-			SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
-			/* We cancel any 'skip signal at dangers' here */
-			v->force_proceed = TFP_NONE;
-			SetWindowDirty(WC_VEHICLE_VIEW, v->index);
+
+			SetWindowDirty(WC_VEHICLE_DEPOT, front->tile);
+			SetWindowDirty(WC_VEHICLE_DETAILS, front->index);
+			SetWindowDirty(WC_VEHICLE_VIEW, front->index);
+			SetWindowClassesDirty(WC_TRAINS_LIST);
 		}
 	} else {
 		/* turn the whole train around */