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
This commit is contained in:
Vadim Zeitlin
2005-09-01 23:18:39 +00:00
parent 5887690b5e
commit 3ee39f97af

View File

@@ -135,8 +135,11 @@ void wxMDIParentFrame::AddChild(wxWindowBase *child)
{ {
m_currentChild = wxDynamicCast(child, wxMDIChildFrame); 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;
} }
} }