summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-12-20 19:44:02 +0000
committermichi_cc <michi_cc@openttd.org>2012-12-20 19:44:02 +0000
commitc75962e04c0999c0c458b2ee54519f094d7c6543 (patch)
tree77dfc5b80771380cba34acf3f6ed564ce8be0657 /src/train_cmd.cpp
parent8eb1cb4ebbfa2b00ca27f860555f5397fe5a1c9e (diff)
downloadopenttd-c75962e04c0999c0c458b2ee54519f094d7c6543.tar.xz
(svn r24833) -Codechange: Replace magic numbers for invalidating vehicle-related windows with an enum.
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 58dd17163..032ed2bdb 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -241,7 +241,7 @@ void Train::ConsistChanged(bool same_length)
if (this->IsFrontEngine()) {
this->UpdateAcceleration();
SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
- InvalidateWindowData(WC_VEHICLE_REFIT, this->index);
+ InvalidateWindowData(WC_VEHICLE_REFIT, this->index, VIWD_CONSIST_CHANGED);
}
}
@@ -1076,7 +1076,7 @@ static void NormaliseTrainHead(Train *head)
if (!head->IsFrontEngine()) return;
/* Update the refit button and window */
- InvalidateWindowData(WC_VEHICLE_REFIT, head->index);
+ InvalidateWindowData(WC_VEHICLE_REFIT, head->index, VIWD_CONSIST_CHANGED);
SetWindowWidgetDirty(WC_VEHICLE_VIEW, head->index, WID_VV_REFIT);
/* If we don't have a unit number yet, set one. */