also a dialog needs the current events set up correctly

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-02-26 13:30:55 +00:00
parent 2712275c88
commit 968978c0e4

View File

@@ -267,7 +267,18 @@ bool shouldHandleSelector(SEL selector)
- (void)sendEvent:(NSEvent *) event
{
if ( ![self WX_filterSendEvent: event] )
{
WXEVENTREF formerEvent = wxTheApp == NULL ? NULL : wxTheApp->MacGetCurrentEvent();
WXEVENTHANDLERCALLREF formerHandler = wxTheApp == NULL ? NULL : wxTheApp->MacGetCurrentEventHandlerCallRef();
if (wxTheApp)
wxTheApp->MacSetCurrentEvent(event, NULL);
[super sendEvent: event];
if (wxTheApp)
wxTheApp->MacSetCurrentEvent(formerEvent , formerHandler);
}
}
@end