Avoid unnecessary redrawing of vehicle list windows

Redraw info section every tick if values have changed
This commit is contained in:
Jonathan G Rennison
2020-10-03 22:28:20 +01:00
parent 2c4808e239
commit bd2649c19e
15 changed files with 79 additions and 52 deletions

View File

@@ -659,7 +659,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
v->MarkDirty();
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
SetWindowClassesDirty(GetWindowClassForVehicleType(v->type));
DirtyVehicleListWindowForVehicle(v);
InvalidateWindowData(WC_VEHICLE_VIEW, v->index);
}
return CommandCost();