Mercurial > hg > openttd
changeset 19241:7ffc79685fbe draft
(svn r24130) -Feature(ette): [FS#2314]: Deselect 'remove' button when changing signal types in the GUI. (Alberth)
author | michi_cc <michi_cc@openttd.org> |
---|---|
date | Tue, 17 Apr 2012 19:43:34 +0000 |
parents | 6d61b53cde41 |
children | be6130c27640 |
files | src/rail_gui.cpp |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1526,6 +1526,13 @@ _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: