summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-06-15 15:31:04 +0000
committerfrosch <frosch@openttd.org>2013-06-15 15:31:04 +0000
commitee4e68bd5e4882397bc023040a2977047d22ccb7 (patch)
tree79ae645add9d9321b815287a2a68d7850100117f /src/newgrf_gui.cpp
parent5cb174c6b86c58b2ff6ec0d245e546328fae6480 (diff)
downloadopenttd-ee4e68bd5e4882397bc023040a2977047d22ccb7.tar.xz
(svn r25413) -Fix-ish: Suppress focussing editboxes which are not visible.
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index fc79decfa..18c539c4e 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -646,7 +646,11 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
this->querystrings[WID_NS_FILTER] = &this->filter_editbox;
this->filter_editbox.cancel_button = QueryString::ACTION_CLEAR;
- if (editable) this->SetFocusedWidget(WID_NS_FILTER);
+ if (editable) {
+ this->SetFocusedWidget(WID_NS_FILTER);
+ } else {
+ this->DisableWidget(WID_NS_FILTER);
+ }
this->avails.SetListing(this->last_sorting);
this->avails.SetFiltering(this->last_filtering);