From 8ceae028c1a1ad0320f7e00847588adff64c71e6 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 22 Mar 2011 06:44:08 +0000 Subject: [PATCH] fixes #12579 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/menu_osx.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index a24b9c2910..964915949f 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -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); -- 2.45.2