wxOSX: store the menu title when inserting it in the menu bar.

We "lost" the menu title if the menu was inserted, and not appended, to the
menu bar, resulting wxMenuBar::GetMenuLabel[Text]() returning empty strings
for it in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-04-26 20:00:52 +00:00
parent 2bc096a0a5
commit 9014508c38

View File

@ -888,6 +888,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
return false;
m_rootMenu->Insert( pos+firstMenuPos, wxMenuItem::New( m_rootMenu, wxID_ANY, title, "", wxITEM_NORMAL, menu ) );
menu->SetTitle(title);
return true;
}