summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-13 21:46:58 +0000
committerfrosch <frosch@openttd.org>2012-11-13 21:46:58 +0000
commit7699a7dc06049956b90d3f41a14109ee05b97514 (patch)
treea27f6da660a39ae2345755a1a1c57fbeb2c025b8 /src/town_gui.cpp
parentfd55399167115dbb06e77bb03f85681ba318f5f2 (diff)
downloadopenttd-7699a7dc06049956b90d3f41a14109ee05b97514.tar.xz
(svn r24732) -Codechange: Unify handling of OK and CANCEL actions for editboxes.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp4
1 files changed, 1 insertions, 3 deletions
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;
}