From: Vadim Zeitlin Date: Fri, 26 Apr 2013 20:00:52 +0000 (+0000) Subject: wxOSX: store the menu title when inserting it in the menu bar. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9014508c38ef874b3170e003d58c2ce9618778d3 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 --- diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index 093da094e4..cf7dcaa670 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -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; }