don't set wxMenu::m_menuBar when appending the menu to menubar as otherwise an assert happens in the base class Attach()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
60e424abd6
commit
c96f9d2162
@ -289,8 +289,6 @@ bool wxMenuBar::Append(wxMenu * menu, const wxString& title)
|
|||||||
menu->SetButtonWidget(w);
|
menu->SetButtonWidget(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
//menu->SetMenuBar(this);
|
|
||||||
|
|
||||||
m_titles.Add(title);
|
m_titles.Add(title);
|
||||||
|
|
||||||
return wxMenuBarBase::Append(menu, title);
|
return wxMenuBarBase::Append(menu, title);
|
||||||
@ -522,7 +520,6 @@ WXWidget wxMenu::CreateMenu (wxMenuBar * menuBar, WXWidget parent, wxMenu * topM
|
|||||||
|
|
||||||
m_menuWidget = (WXWidget) menu;
|
m_menuWidget = (WXWidget) menu;
|
||||||
|
|
||||||
m_menuBar = menuBar;
|
|
||||||
m_topLevelMenu = topMenu;
|
m_topLevelMenu = topMenu;
|
||||||
|
|
||||||
for ( wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
|
for ( wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
|
||||||
|
Loading…
Reference in New Issue
Block a user