diff options
author | rubidium <rubidium@openttd.org> | 2008-05-18 16:51:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-18 16:51:44 +0000 |
commit | 9defec78767131d1dc9765c8943ae3bb165e8713 (patch) | |
tree | 4fbae4aa35ef120179cf9069c2eb93fa136ed7a2 /src/train_cmd.cpp | |
parent | aab9e191f5612d0ddf309d8ec9de109218babd32 (diff) | |
download | openttd-9defec78767131d1dc9765c8943ae3bb165e8713.tar.xz |
(svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 146c33bc1..56bf2a9a7 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -803,7 +803,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 } InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile); - RebuildVehicleLists(); + InvalidateWindowClassesData(WC_TRAINS_LIST, 0); InvalidateWindow(WC_COMPANY, v->owner); if (IsLocalPlayer()) { InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window @@ -1272,7 +1272,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p InvalidateWindow(WC_VEHICLE_DEPOT, dst_head->tile); } - RebuildVehicleLists(); + InvalidateWindowClassesData(WC_TRAINS_LIST, 0); } return CommandCost(); @@ -1353,7 +1353,7 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) DeleteWindowById(WC_VEHICLE_VIEW, first->index); } InvalidateWindow(WC_VEHICLE_DEPOT, first->tile); - RebuildVehicleLists(); + InvalidateWindowClassesData(WC_TRAINS_LIST, 0); } CommandCost cost(EXPENSES_NEW_VEHICLES); @@ -2001,7 +2001,7 @@ CommandCost CmdRefitRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 v->cargo_subtype = new_subtype; InvalidateWindow(WC_VEHICLE_DETAILS, v->index); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); - RebuildVehicleLists(); + InvalidateWindowClassesData(WC_TRAINS_LIST, 0); } } } @@ -2805,7 +2805,7 @@ static void SetVehicleCrashed(Vehicle *v) InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); } - RebuildVehicleLists(); + InvalidateWindowClassesData(WC_TRAINS_LIST, 0); BEGIN_ENUM_WAGONS(v) v->vehstatus |= VS_CRASHED; @@ -3152,7 +3152,7 @@ static void DeleteLastWagon(Vehicle *v) } } - RebuildVehicleLists(); + InvalidateWindowClassesData(WC_TRAINS_LIST, 0); MarkSingleVehicleDirty(v); |