X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fradio-button-impl.cpp;h=79ff3207b58ac666b3a39345875743a43c9249a5;hp=9dd7570b500e0cdfd07e72132fa392dacfffdb41;hb=43c5e7a1be2bb4b6eeb0755ad58aa20baa0095d1;hpb=d87bedc9a0cff8c8002164ebf1375da6b9230662 diff --git a/dali-toolkit/internal/controls/buttons/radio-button-impl.cpp b/dali-toolkit/internal/controls/buttons/radio-button-impl.cpp index 9dd7570..79ff320 100644 --- a/dali-toolkit/internal/controls/buttons/radio-button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/radio-button-impl.cpp @@ -95,29 +95,21 @@ void RadioButton::OnStateChange( State newState ) // Radio button can be part of a group, if a button in the group is selected then all others should be unselected DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "RadioButton::OnStateChange state(%d)\n", newState ); - switch( newState ) - { - case SELECTED_STATE: - { - Actor parent = Self().GetParent(); - if( parent ) - { - for( unsigned int i = 0; i < parent.GetChildCount(); ++i ) - { - Dali::Toolkit::RadioButton radioButtonChild = Dali::Toolkit::RadioButton::DownCast( parent.GetChildAt( i ) ); - if( radioButtonChild && radioButtonChild != Self() ) - { - radioButtonChild.SetSelected( false ); - } - } - } - } - - default: - { - break; - } - } + if ( SELECTED_STATE == newState ) + { + Actor parent = Self().GetParent(); + if( parent ) + { + for( unsigned int i = 0; i < parent.GetChildCount(); ++i ) + { + Dali::Toolkit::RadioButton radioButtonChild = Dali::Toolkit::RadioButton::DownCast( parent.GetChildAt( i ) ); + if( radioButtonChild && radioButtonChild != Self() ) + { + radioButtonChild.SetSelected( false ); + } + } + } + } } } // namespace Internal