]> git.saurik.com Git - wxWidgets.git/commitdiff
hide MDI parent frame if it's empty and a new child has been created
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 1 Sep 2005 23:18:39 +0000 (23:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 1 Sep 2005 23:18:39 +0000 (23:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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;
         }
     }