]> git.saurik.com Git - wxWidgets.git/commitdiff
Close tree edit even if the change is vetoed to be consistent with MSW [patch 1110252]
authorKevin Hock <hockkn@yahoo.com>
Fri, 28 Jan 2005 19:01:40 +0000 (19:01 +0000)
committerKevin Hock <hockkn@yahoo.com>
Fri, 28 Jan 2005 19:01:40 +0000 (19:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 70a21e2ceda6516fac91c03071281faa871eeae9..98b64ffcddeecd6e221d478e9499400a62919088 100644 (file)
@@ -424,12 +424,12 @@ void wxTreeTextCtrl::OnChar( wxKeyEvent &event )
     switch ( event.m_keyCode )
     {
         case WXK_RETURN:
-            if ( AcceptChanges() )
-            {
-                // Close the text control, changes were accepted
-                Finish();
-            }
-            // else do nothing, do not accept and do not close
+            // Notify the owner about the changes
+            AcceptChanges();
+
+            // Even if vetoed, close the control (consistent with MSW)
+            Finish();
+
             break;
 
         case WXK_ESCAPE: