uifw/AvKon/src/AknRadioButtonSettingPage.cpp
branchRCL_3
changeset 21 978afdc0236f
parent 20 d48ab3b357f1
equal deleted inserted replaced
20:d48ab3b357f1 21:978afdc0236f
   179 	
   179 	
   180 	if (!iExtension)
   180 	if (!iExtension)
   181 		{
   181 		{
   182 		iExtension = new (ELeave) CAknRadioButtonSettingPageExtension( *this ); 
   182 		iExtension = new (ELeave) CAknRadioButtonSettingPageExtension( *this ); 
   183 		}
   183 		}
   184 
   184     iExtension->iIsValidSelection = ( iCurrentSelectionIndex != -1 );
   185     // Range should be within the valid indices, or -1:
   185     // Range should be within the valid indices, or -1:
   186 	// So valid range is >= -1 and also < Count.
   186 	// So valid range is >= -1 and also < Count.
   187 	__ASSERT_ALWAYS( iCurrentSelectionIndex >= -1, Panic(	EAknPanicRadioButtonSettingPageIndexOutOfRange) );
   187 	__ASSERT_ALWAYS( iCurrentSelectionIndex >= -1, Panic(	EAknPanicRadioButtonSettingPageIndexOutOfRange) );
   188 	__ASSERT_ALWAYS( iCurrentSelectionIndex < iExtension->iInternalItemArray->Count(), Panic(	EAknPanicRadioButtonSettingPageIndexOutOfRange) );
   188 	__ASSERT_ALWAYS( iCurrentSelectionIndex < iExtension->iInternalItemArray->Count(), Panic(	EAknPanicRadioButtonSettingPageIndexOutOfRange) );
   189 
   189 
   313     if ( ListBoxControl()->IsHighlightEnabled() || 
   313     if ( ListBoxControl()->IsHighlightEnabled() || 
   314             ( iExtension && iExtension->iIsValidSelection ) )
   314             ( iExtension && iExtension->iIsValidSelection ) )
   315         {
   315         {
   316         iCurrentSelectionIndex = ListBoxControl()->CurrentItemIndex();
   316         iCurrentSelectionIndex = ListBoxControl()->CurrentItemIndex();
   317         }
   317         }
   318     else
   318     else if( iCurrentSelectionIndex >= 0 &&
       
   319         iCurrentSelectionIndex < ListBoxControl()->Model()->NumberOfItems() )
   319         {
   320         {
   320         ListBoxControl()->SetCurrentItemIndex ( iCurrentSelectionIndex );
   321         ListBoxControl()->SetCurrentItemIndex ( iCurrentSelectionIndex );
   321         }
   322         }
   322 
   323 
   323     SetRadioButtonSelectionL( iCurrentSelectionIndex );
   324     SetRadioButtonSelectionL( iCurrentSelectionIndex );