summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-03-13 21:33:02 +0000
committerfrosch <frosch@openttd.org>2011-03-13 21:33:02 +0000
commitf051a81b4e5064f6b5c1d00f4a7d0ae38f768e35 (patch)
treed46d4b664842c0baa010d593bb864e1e9eca1702 /src/train_cmd.cpp
parent0ff4f31723c22a53dec3c44de64b0385355e972d (diff)
downloadopenttd-f051a81b4e5064f6b5c1d00f4a7d0ae38f768e35.tar.xz
(svn r22244) -Codechange: Make vehicle windows handle command-/GUI-scope invalidations themself (from autoreplace and refitting).
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index b090837ee..100b467ff 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -264,7 +264,7 @@ void Train::ConsistChanged(bool same_length)
if (this->IsFrontEngine()) {
this->UpdateAcceleration();
SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
- InvalidateWindowData(WC_VEHICLE_REFIT, this->index); // Important, do not invalidate immediately. The refit window tests commands.
+ InvalidateWindowData(WC_VEHICLE_REFIT, this->index);
}
}
@@ -1092,7 +1092,7 @@ static void NormaliseTrainHead(Train *head)
if (!head->IsFrontEngine()) return;
/* Update the refit button and window */
- InvalidateWindowData(WC_VEHICLE_REFIT, head->index); // Important, do not invalidate immediately. The refit window tests commands.
+ InvalidateWindowData(WC_VEHICLE_REFIT, head->index);
SetWindowWidgetDirty(WC_VEHICLE_VIEW, head->index, VVW_WIDGET_REFIT_VEH);
/* If we don't have a unit number yet, set one. */