From: Stefan Csomor Date: Mon, 18 Jan 2010 08:56:20 +0000 (+0000) Subject: setting correct refcon in menus (was incorrectly changed to menuimpl), fixes #11611 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0ee6e44952fc33b6cf1b29aec4ecd3a51e18c123 setting correct refcon in menus (was incorrectly changed to menuimpl), fixes #11611 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index af71ecc6a3..9560c31dd1 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -513,7 +513,7 @@ wxMenu* wxFindMenuFromMacCommand( const HICommand &command , wxMenuItem* &item ) GetMenuItemRefCon( command.menu.menuRef , command.menu.menuItemIndex , &refCon ) ; itemMenu = wxFindMenuFromMacMenu( command.menu.menuRef ) ; if ( itemMenu != NULL && refCon != 0) - item = ((wxMenuItemImpl*) refCon)->GetWXPeer() ; + item = (wxMenuItem*) refCon; } } #endif diff --git a/src/osx/carbon/menu.cpp b/src/osx/carbon/menu.cpp index 3b258bba5c..ab442f635f 100644 --- a/src/osx/carbon/menu.cpp +++ b/src/osx/carbon/menu.cpp @@ -151,7 +151,7 @@ public : { m_parentMenuRef = parentMenuRef; if ( m_parentMenuRef && index > 0 ) - SetMenuItemRefCon( m_parentMenuRef, index, (URefCon) this ); + SetMenuItemRefCon( m_parentMenuRef, index, (URefCon) m_peer ); } MenuItemIndex FindMenuItemIndex() @@ -163,7 +163,7 @@ public : { URefCon storedRef = 0; GetMenuItemRefCon(m_parentMenuRef, i, &storedRef ); - if ( storedRef == (URefCon) this ) + if ( storedRef == (URefCon) m_peer ) { hit = i; break;