rewrite to avoid unnecessary redraws
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,7 +32,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ;
|
||||
|
||||
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , 0 , 1,
|
||||
m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1,
|
||||
kControlRadioButtonProc , (long) this ) ;
|
||||
|
||||
MacPostControlCreate() ;
|
||||
@@ -67,9 +67,11 @@ void wxRadioButton::SetValue(bool val)
|
||||
{
|
||||
int i;
|
||||
wxRadioButton *cycle;
|
||||
|
||||
if ( GetControlValue( m_macControl ) == val )
|
||||
return ;
|
||||
|
||||
::SetControlValue( m_macControl , val ) ;
|
||||
|
||||
Refresh() ;
|
||||
if (val)
|
||||
{
|
||||
cycle=this->NextInCycle();
|
||||
@@ -95,7 +97,7 @@ void wxRadioButton::Command (wxCommandEvent & event)
|
||||
|
||||
void wxRadioButton::MacHandleControlClick( ControlHandle control , SInt16 controlpart )
|
||||
{
|
||||
SetValue(true) ;
|
||||
SetValue(true) ;
|
||||
wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId );
|
||||
event.SetEventObject(this);
|
||||
event.SetInt( GetValue() );
|
||||
|
||||
Reference in New Issue
Block a user