From 3ee39f97af532406533efc0eff451f7999e0917e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 1 Sep 2005 23:18:39 +0000 Subject: [PATCH] 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 --- src/mac/carbon/mdi.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } } -- 2.50.0