summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-28 20:54:56 +0000
committerfrosch <frosch@openttd.org>2012-11-28 20:54:56 +0000
commit155a9d784c84e2a69a4506b19e0d5204aebcebec (patch)
treeb5b84bd629fb15dd3b2aeb69e877efb6648e7a46 /src/window.cpp
parent4c0671f65af64c1fcc1c0373cfa4e1be455b5787 (diff)
downloadopenttd-155a9d784c84e2a69a4506b19e0d5204aebcebec.tar.xz
(svn r24772) -Codechange: Call Window::OnEditboxChanged only when the content changes, not when only moving the cursor.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 9705de0df..08f773337 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2269,9 +2269,14 @@ EventState Window::HandleEditBoxKey(int wid, uint16 key, uint16 keycode)
switch (query->HandleEditBoxKey(this, wid, key, keycode, state)) {
case HEBR_EDITING:
+ this->SetWidgetDirty(wid);
this->OnEditboxChanged(wid);
break;
+ case HEBR_CURSOR:
+ this->SetWidgetDirty(wid);
+ break;
+
case HEBR_CONFIRM:
if (query->ok_button >= 0) {
this->OnClick(Point(), query->ok_button, 1);