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:
Stefan Csomor
2010-01-18 08:56:20 +00:00
parent 1ad953420b
commit 0ee6e44952
2 changed files with 3 additions and 3 deletions

View File

@@ -513,7 +513,7 @@ wxMenu* wxFindMenuFromMacCommand( const HICommand &command , wxMenuItem* &item )
GetMenuItemRefCon( command.menu.menuRef , command.menu.menuItemIndex , &refCon ) ; GetMenuItemRefCon( command.menu.menuRef , command.menu.menuItemIndex , &refCon ) ;
itemMenu = wxFindMenuFromMacMenu( command.menu.menuRef ) ; itemMenu = wxFindMenuFromMacMenu( command.menu.menuRef ) ;
if ( itemMenu != NULL && refCon != 0) if ( itemMenu != NULL && refCon != 0)
item = ((wxMenuItemImpl*) refCon)->GetWXPeer() ; item = (wxMenuItem*) refCon;
} }
} }
#endif #endif

View File

@@ -151,7 +151,7 @@ public :
{ {
m_parentMenuRef = parentMenuRef; m_parentMenuRef = parentMenuRef;
if ( m_parentMenuRef && index > 0 ) if ( m_parentMenuRef && index > 0 )
SetMenuItemRefCon( m_parentMenuRef, index, (URefCon) this ); SetMenuItemRefCon( m_parentMenuRef, index, (URefCon) m_peer );
} }
MenuItemIndex FindMenuItemIndex() MenuItemIndex FindMenuItemIndex()
@@ -163,7 +163,7 @@ public :
{ {
URefCon storedRef = 0; URefCon storedRef = 0;
GetMenuItemRefCon(m_parentMenuRef, i, &storedRef ); GetMenuItemRefCon(m_parentMenuRef, i, &storedRef );
if ( storedRef == (URefCon) this ) if ( storedRef == (URefCon) m_peer )
{ {
hit = i; hit = i;
break; break;