(svn r24833) -Codechange: Replace magic numbers for invalidating vehicle-related windows with an enum.

This commit is contained in:
michi_cc
2012-12-20 19:44:02 +00:00
parent 009d20e990
commit 37da99ab90
7 changed files with 32 additions and 24 deletions

View File

@@ -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. */