diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index f02f3b99cc..5c5a6b521c 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2147,7 +2147,7 @@ void wxListTextCtrl::OnKeyUp( wxKeyEvent &event ) void wxListTextCtrl::OnKillFocus( wxFocusEvent &event ) { - if ( !m_finished ) + if ( !m_finished && !m_aboutToFinish ) { // We must finish regardless of success, otherwise we'll get // focus problems: diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 5a6c21a1b3..25d04b0dee 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -415,7 +415,7 @@ bool wxTreeTextCtrl::AcceptChanges() void wxTreeTextCtrl::Finish() { - if ( !m_finished && !m_aboutToFinish ) + if ( !m_finished ) { m_owner->ResetTextControl(); @@ -470,7 +470,7 @@ void wxTreeTextCtrl::OnKeyUp( wxKeyEvent &event ) void wxTreeTextCtrl::OnKillFocus( wxFocusEvent &event ) { - if ( !m_finished ) + if ( !m_finished && !m_aboutToFinish ) { // We must finish regardless of success, otherwise we'll get // focus problems: