]> git.saurik.com Git - wxWidgets.git/commitdiff
Patch 1709069
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 1 May 2007 11:49:35 +0000 (11:49 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 1 May 2007 11:49:35 +0000 (11:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/mdi.cpp

index 108e0371d82527c6ec219553e3a050299a07951e..ef630d2fc88c1004bf5034f2589b4a0c1cdf4e0b 100644 (file)
@@ -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)