(svn r22043) -Fix: invalidate the right windows when a part of a train is flipped in the depot

This commit is contained in:
rubidium 2011-02-09 20:45:07 +00:00
parent 69789f3008
commit 15514a3011

View File

@ -1806,11 +1806,11 @@ CommandCost CmdReverseTrainDirection(TileIndex tile, DoCommandFlag flags, uint32
if (flags & DC_EXEC) { if (flags & DC_EXEC) {
ToggleBit(v->flags, VRF_REVERSE_DIRECTION); ToggleBit(v->flags, VRF_REVERSE_DIRECTION);
SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
SetWindowDirty(WC_VEHICLE_DETAILS, v->index); SetWindowDirty(WC_VEHICLE_DEPOT, front->tile);
/* We cancel any 'skip signal at dangers' here */ SetWindowDirty(WC_VEHICLE_DETAILS, front->index);
v->force_proceed = TFP_NONE; SetWindowDirty(WC_VEHICLE_VIEW, front->index);
SetWindowDirty(WC_VEHICLE_VIEW, v->index); SetWindowClassesDirty(WC_TRAINS_LIST);
} }
} else { } else {
/* turn the whole train around */ /* turn the whole train around */