Mercurial > hg > openttd
changeset 16848:6c09714f4105 draft
(svn r21582) -Codechange: Simplify BuildRailClick_AutoSignals().
author | alberth <alberth@openttd.org> |
---|---|
date | Tue, 21 Dec 2010 16:36:00 +0000 |
parents | 54ff33a0522f |
children | db0189411a23 |
files | src/rail_gui.cpp |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -456,10 +456,9 @@ */ 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); } }