From: Stefan Csomor Date: Tue, 1 May 2007 11:49:35 +0000 (+0000) Subject: Patch 1709069 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9fbc9db0fa0c8f5042e9fbb2e8ee226b6d1033cc Patch 1709069 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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)