diff options
author | michi_cc <michi_cc@openttd.org> | 2012-04-17 19:43:34 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2012-04-17 19:43:34 +0000 |
commit | f1c59a315961ac8cc4d2e65a33f9322dc32b0941 (patch) | |
tree | 5aa656cf941effa49b73429db632833f87ad76e2 /src | |
parent | 708d5b6712a213a91ac6c91c10da63dfddbef024 (diff) | |
download | openttd-f1c59a315961ac8cc4d2e65a33f9322dc32b0941.tar.xz |
(svn r24130) -Feature(ette): [FS#2314]: Deselect 'remove' button when changing signal types in the GUI. (Alberth)
Diffstat (limited to 'src')
-rw-r--r-- | src/rail_gui.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 584622c36..7d6c541cb 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1526,6 +1526,13 @@ public: _cur_signal_type = (SignalType)((uint)((widget - WID_BS_SEMAPHORE_NORM) % (SIGTYPE_LAST + 1))); _cur_signal_variant = widget >= WID_BS_ELECTRIC_NORM ? SIG_ELECTRIC : SIG_SEMAPHORE; + + /* If 'remove' button of rail build toolbar is active, disable it. */ + if (_remove_button_clicked) { + Window *w = FindWindowById(WC_BUILD_TOOLBAR, TRANSPORT_RAIL); + if (w != NULL) ToggleRailButton_Remove(w); + } + break; case WID_BS_CONVERT: |