(svn r24260) -Change [FS#5126]: Make the oilrig-vehicle list accessible to specators and colour it's caption neutrally grey.

This commit is contained in:
frosch
2012-05-16 22:08:46 +00:00
parent c94a2d5289
commit db09f67674
3 changed files with 12 additions and 18 deletions

View File

@@ -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;
}
}
}