]> git.saurik.com Git - wxWidgets.git/commitdiff
setting correct refcon in menus (was incorrectly changed to menuimpl), fixes #11611
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 18 Jan 2010 08:56:20 +0000 (08:56 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 18 Jan 2010 08:56:20 +0000 (08:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/app.cpp
src/osx/carbon/menu.cpp

index af71ecc6a35c261cf8f9809f5ebd140d8f5a6b54..9560c31dd1d0b3348583abce04da1cdd1c3afc04 100644 (file)
@@ -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
index 3b258bba5cab7ff9768c30f35011f6fbe9d6378b..ab442f635f1942347dc73a00fa1cb2ca7791c8a1 100644 (file)
@@ -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;