fixes #12579
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -497,6 +497,8 @@ wxMenuBar* wxMenuBar::s_macCommonMenuBar = NULL ;
|
||||
bool wxMenuBar::s_macAutoWindowMenu = true ;
|
||||
WXHMENU wxMenuBar::s_macWindowMenuHandle = NULL ;
|
||||
|
||||
const int firstMenuPos = 1; // to account for the 0th application menu on mac
|
||||
|
||||
void wxMenuBar::Init()
|
||||
{
|
||||
m_eventHandler = this;
|
||||
@@ -806,7 +808,7 @@ void wxMenuBar::EnableTop(size_t pos, bool enable)
|
||||
{
|
||||
wxCHECK_RET( IsAttached(), wxT("doesn't work with unattached menubars") );
|
||||
|
||||
m_rootMenu->FindItemByPosition( pos )->Enable(enable);
|
||||
m_rootMenu->FindItemByPosition(pos+firstMenuPos)->Enable(enable);
|
||||
|
||||
Refresh();
|
||||
}
|
||||
@@ -841,8 +843,6 @@ wxString wxMenuBar::GetMenuLabel(size_t pos) const
|
||||
// wxMenuBar construction
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const int firstMenuPos = 1; // to account for the 0th application menu on mac
|
||||
|
||||
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
||||
{
|
||||
wxMenu *menuOld = wxMenuBarBase::Replace(pos, menu, title);
|
||||
|
||||
Reference in New Issue
Block a user