Patch 1709069

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-05-01 11:49:35 +00:00
parent 718dbef6c5
commit 32107b5d76

View File

@@ -123,6 +123,9 @@ void wxMDIParentFrame::GetRectForTopLevelChildren(int *x, int *y, int *w, int *h
void wxMDIParentFrame::AddChild(wxWindowBase *child) void wxMDIParentFrame::AddChild(wxWindowBase *child)
{ {
// moved this to front, so that we don't run into unset m_parent problems later
wxFrame::AddChild(child);
if ( !m_currentChild ) if ( !m_currentChild )
{ {
m_currentChild = wxDynamicCast(child, wxMDIChildFrame); m_currentChild = wxDynamicCast(child, wxMDIChildFrame);
@@ -134,8 +137,6 @@ void wxMDIParentFrame::AddChild(wxWindowBase *child)
m_shouldBeShown = true; m_shouldBeShown = true;
} }
} }
wxFrame::AddChild(child);
} }
void wxMDIParentFrame::RemoveChild(wxWindowBase *child) void wxMDIParentFrame::RemoveChild(wxWindowBase *child)