Author: stippi Date: 2010-01-02 01:06:01 +0100 (Sat, 02 Jan 2010) New Revision: 34848 Changeset: http://dev.haiku-os.org/changeset/34848/haiku Modified: haiku/trunk/src/apps/icon-o-matic/generic/gui/InputTextView.cpp Log: 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. Modified: haiku/trunk/src/apps/icon-o-matic/generic/gui/InputTextView.cpp =================================================================== --- haiku/trunk/src/apps/icon-o-matic/generic/gui/InputTextView.cpp 2010-01-01 23:57:27 UTC (rev 34847) +++ haiku/trunk/src/apps/icon-o-matic/generic/gui/InputTextView.cpp 2010-01-02 00:06:01 UTC (rev 34848) @@ -65,9 +65,11 @@ case B_ESCAPE: // revert any typing changes RevertChanges(); + fTextBeforeFocus = Text(); break; case B_RETURN: ApplyChanges(); + fTextBeforeFocus = Text(); break; default: handled = false;