don't swallow command events that are not handled by accels, fixes #12373

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2011-02-28 12:14:15 +00:00
parent b59cd6c433
commit b895498c75

View File

@ -2072,16 +2072,19 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
// eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars // eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars
wxKeyEvent wxevent2(wxevent) ; wxKeyEvent wxevent2(wxevent) ;
wxevent2.SetEventType(wxEVT_CHAR); wxevent2.SetEventType(wxEVT_CHAR);
GetWXPeer()->OSXHandleKeyEvent(wxevent2); result = GetWXPeer()->OSXHandleKeyEvent(wxevent2);
} }
else else
{ {
if ( [m_osxView isKindOfClass:[NSScrollView class] ] ) if ( !wxevent.CmdDown() )
[[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]]; {
else if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
[m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]]; [[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
else
[m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
result = true;
}
} }
result = true;
} }
} }