From: Vadim Zeitlin Date: Thu, 1 Sep 2005 23:18:39 +0000 (+0000) Subject: hide MDI parent frame if it's empty and a new child has been created X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3ee39f97af532406533efc0eff451f7999e0917e hide MDI parent frame if it's empty and a new child has been created git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/mdi.cpp b/src/mac/carbon/mdi.cpp index 158f2df45c..c7d898778b 100644 --- a/src/mac/carbon/mdi.cpp +++ b/src/mac/carbon/mdi.cpp @@ -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; } }