From: Benjamin Williams Date: Mon, 12 Mar 2007 13:52:34 +0000 (+0000) Subject: prevent disappearing menus in tabmdi X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/092d7f88f6819e52dd8ea69d66e474571e527eba prevent disappearing menus in tabmdi git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index c9c6e2a7eb..a3b7b64be8 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -2599,7 +2599,8 @@ bool wxAuiNotebook::InsertPage(size_t page_idx, // select is false, it must become the "current page" // (though no select events will be fired) if (!select && m_tabs.GetPageCount() == 1) - m_curpage = GetPageIndex(page); + select = true; + //m_curpage = GetPageIndex(page); wxAuiTabCtrl* active_tabctrl = GetActiveTabCtrl(); if (page_idx >= active_tabctrl->GetPageCount()) diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index b6d33ca85b..d3e0b65eb4 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -177,7 +177,10 @@ void wxAuiMDIParentFrame::SetChildMenuBar(wxAuiMDIChildFrame* pChild) if (!pChild) { // No Child, set Our menu bar back. - SetMenuBar(m_pMyMenuBar); + if (m_pMyMenuBar) + SetMenuBar(m_pMyMenuBar); + else + SetMenuBar(GetMenuBar()); // Make sure we know our menu bar is in use m_pMyMenuBar = NULL;