From 43c5e7a1be2bb4b6eeb0755ad58aa20baa0095d1 Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Wed, 14 Dec 2016 15:31:28 +0000 Subject: [PATCH] SVACE error in radio button Change-Id: Iec23e69e66f0d3c256ac7995e1c71a55e9703aa4 --- .../controls/buttons/radio-button-impl.cpp | 38 +++++++++------------- 1 file changed, 15 insertions(+), 23 deletions(-) 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 -- 2.7.4