From 532a044c3c7bc082321f49bf0066b887d932c6f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 2 Jan 2010 00:06:01 +0000 Subject: [PATCH] Adopt the text we check on when switching focus after applying or reverting the value, otherwise it would not work correctly in some tricky conditions, inserting unnecessary undo steps or none at all for example when changing a value, applying and then changing it back manually and switching focus. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34848 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/icon-o-matic/generic/gui/InputTextView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apps/icon-o-matic/generic/gui/InputTextView.cpp b/src/apps/icon-o-matic/generic/gui/InputTextView.cpp index d1901d06e8..74ee0736eb 100644 --- a/src/apps/icon-o-matic/generic/gui/InputTextView.cpp +++ b/src/apps/icon-o-matic/generic/gui/InputTextView.cpp @@ -65,9 +65,11 @@ InputTextView::KeyDown(const char* bytes, int32 numBytes) case B_ESCAPE: // revert any typing changes RevertChanges(); + fTextBeforeFocus = Text(); break; case B_RETURN: ApplyChanges(); + fTextBeforeFocus = Text(); break; default: handled = false;