summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-26 21:08:51 +0000
committerrubidium <rubidium@openttd.org>2008-12-26 21:08:51 +0000
commit0c6c3311c9bd3e5544b632433c4d8416d6273848 (patch)
treedbb2d01a3da0060c340d6e2adcfcf1188c8f3891 /src/roadveh_cmd.cpp
parentc34ce32f261fb145af2d2153f0e694ac7a99a80c (diff)
downloadopenttd-0c6c3311c9bd3e5544b632433c4d8416d6273848.tar.xz
(svn r14748) -Codechange: unduplicate window updating when deleting vehicles.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 65c040402..e53c133a9 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -344,12 +344,6 @@ CommandCost CmdSellRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
CommandCost ret(EXPENSES_NEW_VEHICLES, -v->value);
if (flags & DC_EXEC) {
- // Invalidate depot
- InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
- InvalidateWindowClassesData(WC_ROADVEH_LIST, 0);
- InvalidateWindow(WC_COMPANY, v->owner);
- DeleteWindowById(WC_VEHICLE_VIEW, v->index);
- DeleteDepotHighlightOfVehicle(v);
delete v;
}
@@ -537,15 +531,8 @@ static void DeleteLastRoadVeh(Vehicle *v)
for (; v->Next() != NULL; v = v->Next()) u = v;
u->SetNext(NULL);
- DeleteWindowById(WC_VEHICLE_VIEW, v->index);
-
- InvalidateWindowClassesData(WC_ROADVEH_LIST, 0);
- InvalidateWindow(WC_COMPANY, v->owner);
-
if (IsTileType(v->tile, MP_STATION)) ClearCrashedStation(v);
- MarkSingleVehicleDirty(v);
-
delete v;
}