From 8028be3a32dce959242c786510e2da6910d72b56 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 8 Jun 2005 23:05:04 +0000 Subject: [PATCH] For consistency with the other ports don't send an event when a radio button is deselected in response to another in the same group being selected. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/radiobut.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/mac/carbon/radiobut.cpp b/src/mac/carbon/radiobut.cpp index f67e7c68b2..a265da4e8c 100644 --- a/src/mac/carbon/radiobut.cpp +++ b/src/mac/carbon/radiobut.cpp @@ -108,28 +108,21 @@ wxInt32 wxRadioButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVE { // if already set -> no action if ( GetValue() ) - return noErr; + return noErr; - wxRadioButton *cycle, *old = NULL ; + wxRadioButton *cycle; cycle=this->NextInCycle(); if (cycle!=NULL) { - while (cycle!=this) { + while (cycle!=this) { if ( cycle->GetValue() ) { - old = cycle ; cycle->SetValue(false); - } - cycle=cycle->NextInCycle(); } + cycle=cycle->NextInCycle(); + } } - SetValue(true) ; + SetValue(true) ; - if ( old ) { - wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, old->m_windowId ); - event.SetEventObject(old); - event.SetInt( false ); - old->ProcessCommand(event); - } wxCommandEvent event2(wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId ); event2.SetEventObject(this); event2.SetInt( true ); -- 2.45.2