diff options
author | alberth <alberth@openttd.org> | 2010-12-21 16:36:00 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-12-21 16:36:00 +0000 |
commit | a448dc24d960efd4cfa403ef2fb6495afb848d95 (patch) | |
tree | 240695e5849b70632cd561084b155af174668342 | |
parent | 35491b71fb2bedbfbad98cc85c97f2329b3268f3 (diff) | |
download | openttd-a448dc24d960efd4cfa403ef2fb6495afb848d95.tar.xz |
(svn r21582) -Codechange: Simplify BuildRailClick_AutoSignals().
-rw-r--r-- | src/rail_gui.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 5e976be7b..4dcd23531 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -456,10 +456,9 @@ static void BuildRailClick_Station(Window *w) */ static void BuildRailClick_AutoSignals(Window *w) { - if (_settings_client.gui.enable_signal_gui != _ctrl_pressed) { - if (HandlePlacePushButton(w, RTW_BUILD_SIGNALS, ANIMCURSOR_BUILDSIGNALS, HT_RECT, PlaceRail_AutoSignals)) ShowSignalBuilder(w); - } else { - HandlePlacePushButton(w, RTW_BUILD_SIGNALS, ANIMCURSOR_BUILDSIGNALS, HT_RECT, PlaceRail_AutoSignals); + bool started = HandlePlacePushButton(w, RTW_BUILD_SIGNALS, ANIMCURSOR_BUILDSIGNALS, HT_RECT, PlaceRail_AutoSignals); + if (started && _settings_client.gui.enable_signal_gui != _ctrl_pressed) { + ShowSignalBuilder(w); } } |