]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/mdi.cpp
hide MDI parent frame if it's empty and a new child has been created
[wxWidgets.git] / src / mac / carbon / mdi.cpp
index 158f2df45ccdd0ebd8724442234cbb3564f070e7..c7d898778bc41aa4f1dffa9427b6118944284761 100644 (file)
@@ -135,8 +135,11 @@ void wxMDIParentFrame::AddChild(wxWindowBase *child)
     {
         m_currentChild = wxDynamicCast(child, wxMDIChildFrame);
 
-        if ( m_currentChild && IsShown() && ShouldBeVisible() )
+        if ( m_currentChild && IsShown() && !ShouldBeVisible() )
         {
+            // we shouldn't remain visible any more
+            wxFrame::Show(false);
+            m_shouldBeShown = true;
         }
     }