summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rail_gui.cpp12
-rw-r--r--src/settings.cpp11
2 files changed, 20 insertions, 3 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 861a41f3c..bbab6bfda 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1328,11 +1328,19 @@ static void SignalBuildWndProc(Window *w, WindowEvent *e)
break;
case BSW_DRAG_SIGNALS_DENSITY_DECREASE:
- if (_patches.drag_signals_density > 1) _patches.drag_signals_density--;
+ if (_patches.drag_signals_density > 1) {
+ _patches.drag_signals_density--;
+ const Window *w = FindWindowById(WC_GAME_OPTIONS, 0);
+ if (w != NULL) SetWindowDirty(w);
+ }
break;
case BSW_DRAG_SIGNALS_DENSITY_INCREASE:
- if (_patches.drag_signals_density < 20) _patches.drag_signals_density++;
+ if (_patches.drag_signals_density < 20) {
+ _patches.drag_signals_density++;
+ const Window *w = FindWindowById(WC_GAME_OPTIONS, 0);
+ if (w != NULL) SetWindowDirty(w);
+ }
break;
default: break;
diff --git a/src/settings.cpp b/src/settings.cpp
index 1827f1b07..c997c466f 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1208,6 +1208,15 @@ static int32 RealisticAccelerationChanged(int32 p1)
return 0;
}
+static int32 DragSignalsDensityChanged(int32)
+{
+ const Window *w = FindWindowById(WC_BUILD_SIGNAL, 0);
+
+ if (w != NULL) SetWindowDirty(w);
+
+ return 0;
+}
+
/**
* Check for right TownLayout usage in editor mode.
* The No Road mode is not desirable since towns have to be
@@ -1404,7 +1413,7 @@ const SettingDesc _patch_settings[] = {
SDT_BOOL(Patches, signal_side, N,NN, true, STR_CONFIG_PATCHES_SIGNALSIDE, RedrawScreen),
SDT_BOOL(Patches, always_small_airport, 0,NN, false, STR_CONFIG_PATCHES_SMALL_AIRPORTS, NULL),
SDT_BOOL(Patches, enable_signal_gui, S, 0, false, STR_CONFIG_PATCHES_ENABLE_SIGNAL_GUI, NULL),
- SDT_VAR(Patches, drag_signals_density,SLE_UINT8,S, 0, 4, 1, 20, 0, STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY,NULL),
+ SDT_VAR(Patches, drag_signals_density,SLE_UINT8,S, 0, 4, 1, 20, 0, STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY,DragSignalsDensityChanged),
SDT_VAR(Patches, semaphore_build_before,SLE_INT32, S, NC, 1975, MIN_YEAR, MAX_YEAR, 1, STR_CONFIG_PATCHES_SEMAPHORE_BUILD_BEFORE_DATE, ResetSignalVariant),
SDT_CONDVAR(Patches, town_layout, SLE_UINT8, 59, SL_MAX_VERSION, 0, MS, TL_ORIGINAL, TL_NO_ROADS, NUM_TLS - 1, 1, STR_CONFIG_PATCHES_TOWN_LAYOUT, CheckTownLayout),