better handling situation when active frame is destroyed or hidden
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -576,6 +576,11 @@ wxWindowMGL::~wxWindowMGL()
|
||||
wxWindowMGL *win = (wxWindowMGL*)m_wnd->prev->userData;
|
||||
win->SetFocus();
|
||||
}
|
||||
else if ( m_wnd->next )
|
||||
{
|
||||
wxWindowMGL *win = (wxWindowMGL*)m_wnd->next->userData;
|
||||
win->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
if ( gs_focusedWindow == this )
|
||||
@@ -766,6 +771,15 @@ bool wxWindowMGL::Show(bool show)
|
||||
wxWindowMGL *win = (wxWindowMGL*)m_wnd->prev->userData;
|
||||
win->SetFocus();
|
||||
}
|
||||
else if ( m_wnd->next )
|
||||
{
|
||||
wxWindowMGL *win = (wxWindowMGL*)m_wnd->next->userData;
|
||||
win->SetFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
gs_activeFrame = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user