From 96a8240e872cf58c9bb38e67b0f6a1c4bcf43042 Mon Sep 17 00:00:00 2001 From: Steve Browne Date: Thu, 12 Mar 2015 13:08:39 +0100 Subject: [PATCH] Fix toggling of radio tools in wxOSX wxToolBar. Always call NSButton::setState(), even when using native toolbar. Closes #16662. --- src/osx/cocoa/toolbar.mm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/osx/cocoa/toolbar.mm b/src/osx/cocoa/toolbar.mm index 1dc3f824b9..19219e2664 100644 --- a/src/osx/cocoa/toolbar.mm +++ b/src/osx/cocoa/toolbar.mm @@ -597,12 +597,10 @@ void wxToolBarTool::UpdateToggleImage( bool toggle ) else [m_toolbarItem setImage:m_bmpNormal.GetNSImage()]; } - else #endif - { - if ( IsButton() ) - [(NSButton*)m_controlHandle setState:(toggle ? NSOnState : NSOffState)]; - } + + if ( IsButton() ) + [(NSButton*)m_controlHandle setState:(toggle ? NSOnState : NSOffState)]; } wxToolBarTool::wxToolBarTool(