From 32107b5d76c80ac5f857c338c181830c37fa9cad Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 1 May 2007 11:49:35 +0000 Subject: [PATCH] Patch 1709069 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/mdi.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mac/carbon/mdi.cpp b/src/mac/carbon/mdi.cpp index 108e0371d8..ef630d2fc8 100644 --- a/src/mac/carbon/mdi.cpp +++ b/src/mac/carbon/mdi.cpp @@ -123,6 +123,9 @@ void wxMDIParentFrame::GetRectForTopLevelChildren(int *x, int *y, int *w, int *h 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 ) { m_currentChild = wxDynamicCast(child, wxMDIChildFrame); @@ -134,8 +137,6 @@ void wxMDIParentFrame::AddChild(wxWindowBase *child) m_shouldBeShown = true; } } - - wxFrame::AddChild(child); } void wxMDIParentFrame::RemoveChild(wxWindowBase *child)