X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/716d0327363e81485eb6dd13b62d6f83c9dd4bab..6908078e2759d5036152e763337fe12acb2e9b89:/src/mac/carbon/mdi.cpp 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)