keyboard/focus handling improved a bit more:
1. wxFrame doesn't give focus to anything at all on activation 2. last control restored more often (some problems still persist) 3. buttons process enter 4. text controls with wxTE_PROCESS_TAB still leave TAB work as dialog navigation key if the event wasn't processed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -191,6 +191,16 @@ wxWindowBase::~wxWindowBase()
|
||||
|
||||
wxASSERT_MSG( GetChildren().GetCount() == 0, _T("children not destroyed") );
|
||||
|
||||
// make sure that there are no dangling pointers left pointing to us
|
||||
wxPanel *panel = wxDynamicCast(GetParent(), wxPanel);
|
||||
if ( panel )
|
||||
{
|
||||
if ( panel->GetLastFocus() == this )
|
||||
{
|
||||
panel->SetLastFocus((wxWindow *)NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_CARET
|
||||
if ( m_caret )
|
||||
delete m_caret;
|
||||
|
Reference in New Issue
Block a user