summaryrefslogtreecommitdiff
path: root/src/station.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
commitb3f2f40db7ffe7ff0b89a77d232b32302a38cd8c (patch)
tree12aa6dc7cf0075753009d46f0a0d94eee8def600 /src/station.cpp
parentbde4b6020a001b78052fce910867ce07c8656f76 (diff)
downloadopenttd-b3f2f40db7ffe7ff0b89a77d232b32302a38cd8c.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/station.cpp')
-rw-r--r--src/station.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/station.cpp b/src/station.cpp
index 4bb65b0d8..672c3d320 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -33,6 +33,7 @@
#include "order_func.h"
#include "news_func.h"
#include "aircraft.h"
+#include "vehicle_gui.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -87,6 +88,11 @@ Station::~Station()
InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
DeleteWindowById(WC_STATION_VIEW, index);
+ WindowNumber wno = (index << 16) | VLW_STATION_LIST | this->owner;
+ DeleteWindowById(WC_TRAINS_LIST, wno | (VEH_TRAIN << 11));
+ DeleteWindowById(WC_ROADVEH_LIST, wno | (VEH_ROAD << 11));
+ DeleteWindowById(WC_SHIPS_LIST, wno | (VEH_SHIP << 11));
+ DeleteWindowById(WC_AIRCRAFT_LIST, wno | (VEH_AIRCRAFT << 11));
/* Now delete all orders that go to the station */
RemoveOrderFromAllVehicles(OT_GOTO_STATION, index);