diff options
author | rubidium <rubidium@openttd.org> | 2010-09-08 21:37:13 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-09-08 21:37:13 +0000 |
commit | f5128695c54ad634e1ac45ae4271c1db5ed15fad (patch) | |
tree | 7fe3411110d924b4c2d879f3c32ceb5a0ddd4f00 /src/station_gui.cpp | |
parent | 881c6c679ff2606111cb890847147556142c3451 (diff) | |
download | openttd-f5128695c54ad634e1ac45ae4271c1db5ed15fad.tar.xz |
(svn r20772) -Codechange: use packed VehicleListIdentifiers as window numbers
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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) |