summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-13 21:47:02 +0000
committerfrosch <frosch@openttd.org>2012-11-13 21:47:02 +0000
commitc4d7c8dd427287d42374b5a83842f570642b100c (patch)
tree2f27364c8fa88537277244fade47f87bcbe4b6fd /src/ai
parent7699a7dc06049956b90d3f41a14109ee05b97514 (diff)
downloadopenttd-c4d7c8dd427287d42374b5a83842f570642b100c.tar.xz
(svn r24733) -Codechange: Move handling of editbox keys to window class.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index e4320ae17..060f6b946 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -1340,10 +1340,8 @@ struct AIDebugWindow : public QueryStringBaseWindow {
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
{
EventState state = ES_NOT_HANDLED;
- if (this->HandleEditBoxKey(WID_AID_BREAK_STR_EDIT_BOX, key, keycode, state) == HEBR_NOT_FOCUSED) {
- /* Edit boxs is not globally foused => handle hotkeys of AI Debug window. */
- int num = CheckHotkeyMatch(aidebug_hotkeys, keycode, this);
- if (num == -1) return ES_NOT_HANDLED;
+ int num = CheckHotkeyMatch(aidebug_hotkeys, keycode, this);
+ if (num != -1) {
if (this->show_break_box && num == WID_AID_BREAK_STR_EDIT_BOX) {
this->SetFocusedWidget(WID_AID_BREAK_STR_EDIT_BOX);
SetFocusedWindow(this);