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
This commit is contained in:
@@ -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
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user