git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66047
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxWidgetCocoaImpl::SetDefaultButton( bool isDefault )
{
void wxWidgetCocoaImpl::SetDefaultButton( bool isDefault )
{
- if ( isDefault && [m_osxView isKindOfClass:[NSButton class]] )
- // NOTE: setKeyEquivalent: nil will trigger an assert
- // instead do not call in that case.
- [(NSButton*)m_osxView setKeyEquivalent: @"\r" ];
+ if ( [m_osxView isKindOfClass:[NSButton class]] )
+ {
+ if ( isDefault )
+ [(NSButton*)m_osxView setKeyEquivalent: @"\r" ];
+ else
+ [(NSButton*)m_osxView setKeyEquivalent: @"" ];
+ }
}
void wxWidgetCocoaImpl::PerformClick()
}
void wxWidgetCocoaImpl::PerformClick()