fix for wxFrame's last focus bug (finally?)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-06-03 09:43:36 +00:00
parent 161f4f7380
commit cc0c7cd8a5

View File

@@ -297,15 +297,18 @@ wxWindow::~wxWindow()
{
if ( frame->GetLastFocus() == this )
frame->SetLastFocus((wxWindow*)NULL);
//break;
break;
}
}
// VS: destroy children first and _then_ detach *this from its parent.
// If we'd do it the other way around, children wouldn't be able
// find their parent frame (see above).
DestroyChildren();
if ( m_parent )
m_parent->RemoveChild(this);
DestroyChildren();
if ( m_hWnd )
{
// VZ: test temp removed to understand what really happens here