Zoning: Add mode to show station catchment only where station window open.

This commit is contained in:
Jonathan G Rennison
2016-01-01 12:17:11 +00:00
parent c120b810d1
commit 7f84a1c501
5 changed files with 35 additions and 12 deletions

View File

@@ -33,6 +33,7 @@
#include "town.h"
#include "linkgraph/linkgraph.h"
#include "zoom_func.h"
#include "zoning.h"
#include "widgets/station_widget.h"
@@ -1307,10 +1308,12 @@ struct StationViewWindow : public Window {
this->sort_orders[0] = SO_ASCENDING;
this->SelectSortOrder((SortOrder)_settings_client.gui.station_gui_sort_order);
this->owner = Station::Get(window_number)->owner;
ZoningStationWindowOpenClose(Station::Get(window_number));
}
~StationViewWindow()
{
ZoningStationWindowOpenClose(Station::Get(window_number));
DeleteWindowById(WC_TRAINS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN, this->owner, this->window_number).Pack(), false);
DeleteWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, this->owner, this->window_number).Pack(), false);
DeleteWindowById(WC_SHIPS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP, this->owner, this->window_number).Pack(), false);