summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-01-12 15:44:37 +0000
committerfrosch <frosch@openttd.org>2009-01-12 15:44:37 +0000
commiteb6dc2b8ae20251473b8d2ee16279ebc1cae6581 (patch)
treefac5f6a4c7da6dcf3f884fa5139e127ef2484b0e /src
parent9a80c0b1dea92a87cd1c35f848a7e0e714494db1 (diff)
downloadopenttd-eb6dc2b8ae20251473b8d2ee16279ebc1cae6581.tar.xz
(svn r15019) -Fix (r14919): Close station selection window, when disabling distant-join setting. (PhilSophus)
Diffstat (limited to 'src')
-rw-r--r--src/settings.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 50e238ec7..12f835c43 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -889,6 +889,12 @@ static int32 InvalidateTownViewWindow(int32 p1)
return 0;
}
+static int32 DeleteSelectStationWindow(int32 p1)
+{
+ DeleteWindowById(WC_SELECT_STATION, 0);
+ return 0;
+}
+
static int32 UpdateConsists(int32 p1)
{
Vehicle *v;
@@ -1304,7 +1310,7 @@ const SettingDesc _patch_settings[] = {
SDT_CONDBOOL(GameSettings, construction.road_stop_on_town_road, 47, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_PATCHES_STOP_ON_TOWN_ROAD, NULL),
SDT_CONDBOOL(GameSettings, station.adjacent_stations, 62, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_PATCHES_ADJACENT_STATIONS, NULL),
SDT_CONDBOOL(GameSettings, economy.station_noise_level, 96, SL_MAX_VERSION, 0, 0, false, STR_CONFIG_PATCHES_NOISE_LEVEL, InvalidateTownViewWindow),
- SDT_CONDBOOL(GameSettings, station.distant_join_stations, 106, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_PATCHES_DISTANT_JOIN_STATIONS, NULL),
+ SDT_CONDBOOL(GameSettings, station.distant_join_stations, 106, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_PATCHES_DISTANT_JOIN_STATIONS, DeleteSelectStationWindow),
SDT_BOOL(GameSettings, economy.inflation, 0, 0, true, STR_CONFIG_PATCHES_INFLATION, NULL),
SDT_VAR(GameSettings, construction.raw_industry_construction, SLE_UINT8, 0,MS, 0, 0, 2, 0, STR_CONFIG_PATCHES_RAW_INDUSTRY_CONSTRUCTION_METHOD, InvalidateBuildIndustryWindow),