implementing turning off of default button as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -188,10 +188,13 @@ wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer,
|
|||||||
|
|
||||||
void wxWidgetCocoaImpl::SetDefaultButton( bool isDefault )
|
void wxWidgetCocoaImpl::SetDefaultButton( bool isDefault )
|
||||||
{
|
{
|
||||||
if ( isDefault && [m_osxView isKindOfClass:[NSButton class]] )
|
if ( [m_osxView isKindOfClass:[NSButton class]] )
|
||||||
// NOTE: setKeyEquivalent: nil will trigger an assert
|
{
|
||||||
// instead do not call in that case.
|
if ( isDefault )
|
||||||
[(NSButton*)m_osxView setKeyEquivalent: @"\r" ];
|
[(NSButton*)m_osxView setKeyEquivalent: @"\r" ];
|
||||||
|
else
|
||||||
|
[(NSButton*)m_osxView setKeyEquivalent: @"" ];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWidgetCocoaImpl::PerformClick()
|
void wxWidgetCocoaImpl::PerformClick()
|
||||||
|
Reference in New Issue
Block a user