From 7699a7dc06049956b90d3f41a14109ee05b97514 Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 13 Nov 2012 21:46:58 +0000 Subject: (svn r24732) -Codechange: Unify handling of OK and CANCEL actions for editboxes. --- src/town_gui.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/town_gui.cpp') diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 2f31ad736..d3c759e37 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -1104,9 +1104,7 @@ public: virtual EventState OnKeyPress(uint16 key, uint16 keycode) { EventState state = ES_NOT_HANDLED; - if (this->HandleEditBoxKey(WID_TF_TOWN_NAME_EDITBOX, key, keycode, state) == HEBR_CANCEL) { - this->UnfocusFocusedWidget(); - } + this->HandleEditBoxKey(WID_TF_TOWN_NAME_EDITBOX, key, keycode, state); return state; } -- cgit v1.2.3-54-g00ecf