summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-02 20:59:04 +0000
committerrubidium <rubidium@openttd.org>2009-01-02 20:59:04 +0000
commitd91baac764ccd1a29c07ec871ab96f0d709f7813 (patch)
tree12aa6dc7cf0075753009d46f0a0d94eee8def600 /src/train_cmd.cpp
parent80a35db52c8e2f88482fb63b5dee17c81be541f9 (diff)
downloadopenttd-d91baac764ccd1a29c07ec871ab96f0d709f7813.tar.xz
(svn r14785) -Fix [FS#2132]: vehicle list for station gets closed when station view is closed even when the vehicle list is stickied. Other vehicle lists are not deleted when their 'opening' window gets closed so do the same with the station view.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index e98461410..cd085c0d2 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1293,6 +1293,10 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
if (IsFrontEngine(src)) {
/* the vehicle was previously a loco. need to free the order list and delete vehicle windows etc. */
DeleteWindowById(WC_VEHICLE_VIEW, src->index);
+ DeleteWindowById(WC_VEHICLE_ORDERS, src->index);
+ DeleteWindowById(WC_VEHICLE_REFIT, src->index);
+ DeleteWindowById(WC_VEHICLE_DETAILS, src->index);
+ DeleteWindowById(WC_VEHICLE_TIMETABLE, src->index);
DeleteVehicleOrders(src);
RemoveVehicleFromGroup(src);
}
@@ -1402,6 +1406,10 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
if (flags & DC_EXEC) {
if (v == first && IsFrontEngine(first)) {
DeleteWindowById(WC_VEHICLE_VIEW, first->index);
+ DeleteWindowById(WC_VEHICLE_ORDERS, first->index);
+ DeleteWindowById(WC_VEHICLE_REFIT, first->index);
+ DeleteWindowById(WC_VEHICLE_DETAILS, first->index);
+ DeleteWindowById(WC_VEHICLE_TIMETABLE, first->index);
}
InvalidateWindow(WC_VEHICLE_DEPOT, first->tile);
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);