Close tree edit even if the change is vetoed to be consistent with MSW [patch 1110252]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Hock
2005-01-28 19:01:40 +00:00
parent 3e172c2019
commit b4a5e7b6f1

View File

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