From f5128695c54ad634e1ac45ae4271c1db5ed15fad Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 8 Sep 2010 21:37:13 +0000 Subject: (svn r20772) -Codechange: use packed VehicleListIdentifiers as window numbers --- src/station_gui.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/station_gui.cpp') diff --git a/src/station_gui.cpp b/src/station_gui.cpp index a2b85a287..37ff622d3 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -28,6 +28,7 @@ #include "company_base.h" #include "sortlist_type.h" #include "core/geometry_func.hpp" +#include "vehiclelist.h" #include "table/strings.h" @@ -903,12 +904,11 @@ struct StationViewWindow : public Window { ~StationViewWindow() { - WindowNumber wno = (this->window_number << 16) | VLW_STATION_LIST | Station::Get(this->window_number)->owner; - - DeleteWindowById(WC_TRAINS_LIST, wno | (VEH_TRAIN << 11), false); - DeleteWindowById(WC_ROADVEH_LIST, wno | (VEH_ROAD << 11), false); - DeleteWindowById(WC_SHIPS_LIST, wno | (VEH_SHIP << 11), false); - DeleteWindowById(WC_AIRCRAFT_LIST, wno | (VEH_AIRCRAFT << 11), false); + Owner owner = Station::Get(this->window_number)->owner; + DeleteWindowById(WC_TRAINS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN, owner, this->window_number).Pack(), false); + DeleteWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, owner, this->window_number).Pack(), false); + DeleteWindowById(WC_SHIPS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP, owner, this->window_number).Pack(), false); + DeleteWindowById(WC_AIRCRAFT_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_AIRCRAFT, owner, this->window_number).Pack(), false); } virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) -- cgit v1.2.3-54-g00ecf