summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-05-16 22:08:46 +0000
committerfrosch <frosch@openttd.org>2012-05-16 22:08:46 +0000
commitdb09f6767465aebe8e90bbe8dd65aa50aafcbc94 (patch)
tree4efa361cae2e7ddc074b5c04de63b6e0b37d274b /src/station_gui.cpp
parentc94a2d52896964f16f3f972c115bbb687861ab1c (diff)
downloadopenttd-db09f6767465aebe8e90bbe8dd65aa50aafcbc94.tar.xz
(svn r24260) -Change [FS#5126]: Make the oilrig-vehicle list accessible to specators and colour it's caption neutrally grey.
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 6d758fdcf..6ebbfaaac 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -854,8 +854,6 @@ struct StationViewWindow : public Window {
~StationViewWindow()
{
Owner owner = Station::Get(this->window_number)->owner;
- if (!Company::IsValidID(owner)) owner = _local_company;
- if (!Company::IsValidID(owner)) return; // Spectators
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);
@@ -1162,9 +1160,11 @@ struct StationViewWindow : public Window {
case WID_SV_TRAINS: // Show list of scheduled trains to this station
case WID_SV_ROADVEHS: // Show list of scheduled road-vehicles to this station
case WID_SV_SHIPS: // Show list of scheduled ships to this station
- case WID_SV_PLANES: // Show list of scheduled aircraft to this station
- ShowVehicleListWindow(this->owner, (VehicleType)(widget - WID_SV_TRAINS), (StationID)this->window_number);
+ case WID_SV_PLANES: { // Show list of scheduled aircraft to this station
+ Owner owner = Station::Get(this->window_number)->owner;
+ ShowVehicleListWindow(owner, (VehicleType)(widget - WID_SV_TRAINS), (StationID)this->window_number);
break;
+ }
}
}