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
This commit is contained in:
Stephan Aßmus 2010-01-02 00:06:01 +00:00
parent 28051eb04d
commit 532a044c3c

View File

@ -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;