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:
@@ -888,6 +888,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_rootMenu->Insert( pos+firstMenuPos, wxMenuItem::New( m_rootMenu, wxID_ANY, title, "", wxITEM_NORMAL, menu ) );
|
m_rootMenu->Insert( pos+firstMenuPos, wxMenuItem::New( m_rootMenu, wxID_ANY, title, "", wxITEM_NORMAL, menu ) );
|
||||||
|
menu->SetTitle(title);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user