(svn r24833) -Codechange: Replace magic numbers for invalidating vehicle-related windows with an enum.
This commit is contained in:
@@ -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. */
|
||||
|
Reference in New Issue
Block a user