Viewport: Refactor handling of vehicle route overlays
This commit is contained in:
@@ -211,7 +211,7 @@ struct SchdispatchWindow : GeneralVehicleWindow {
|
||||
~SchdispatchWindow()
|
||||
{
|
||||
if (!FocusWindowById(WC_VEHICLE_VIEW, this->window_number)) {
|
||||
MarkAllRouteStepsDirty(this->vehicle);
|
||||
MarkDirtyFocusedRoutePaths(this->vehicle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -900,8 +900,7 @@ struct SchdispatchWindow : GeneralVehicleWindow {
|
||||
virtual void OnFocus(Window *previously_focused_window) override
|
||||
{
|
||||
if (HasFocusedVehicleChanged(this->window_number, previously_focused_window)) {
|
||||
MarkAllRoutePathsDirty(this->vehicle);
|
||||
MarkAllRouteStepsDirty(this->vehicle);
|
||||
MarkDirtyFocusedRoutePaths(this->vehicle);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user