diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -546,7 +546,7 @@ CommandCost CmdInsertOrder(TileIndex til } /* Make sure to rebuild the whole list */ - RebuildVehicleLists(); + InvalidateWindowClassesData(GetWindowClassForVehicleType(v->type), 0); } return CommandCost(); @@ -561,7 +561,7 @@ static CommandCost DecloneOrder(Vehicle if (flags & DC_EXEC) { DeleteVehicleOrders(dst); InvalidateVehicleOrder(dst); - RebuildVehicleLists(); + InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0); } return CommandCost(); } @@ -673,7 +673,7 @@ CommandCost CmdDeleteOrder(TileIndex til cur_order_id++; } - RebuildVehicleLists(); + InvalidateWindowClassesData(GetWindowClassForVehicleType(v->type), 0); } return CommandCost(); @@ -811,7 +811,7 @@ CommandCost CmdMoveOrder(TileIndex tile, } /* Make sure to rebuild the whole list */ - RebuildVehicleLists(); + InvalidateWindowClassesData(GetWindowClassForVehicleType(v->type), 0); } return CommandCost(); @@ -1075,7 +1075,7 @@ CommandCost CmdCloneOrder(TileIndex tile InvalidateVehicleOrder(dst); InvalidateVehicleOrder(src); - RebuildVehicleLists(); + InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0); } } break; @@ -1134,7 +1134,7 @@ CommandCost CmdCloneOrder(TileIndex tile InvalidateVehicleOrder(dst); - RebuildVehicleLists(); + InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0); } } break;