landmarksui/uicontrols/src/CLmkAppLmSelectorImpl.cpp
branchRCL_3
changeset 5 41042d2af523
parent 3 3c271c9e6618
child 16 8173571d354e
equal deleted inserted replaced
3:3c271c9e6618 5:41042d2af523
   567    TInt currentItemIndex = LmItemListProvider().SelectedIndex(iNewLmkItemId);// iListBox->CurrentItemIndex();
   567    TInt currentItemIndex = LmItemListProvider().SelectedIndex(iNewLmkItemId);// iListBox->CurrentItemIndex();
   568    if (listProviderCount != listBoxItemCount)
   568    if (listProviderCount != listBoxItemCount)
   569        {
   569        {
   570        iDeletionHelper.StoreListInformation( *iListBox, EFalse );
   570        iDeletionHelper.StoreListInformation( *iListBox, EFalse );
   571        }
   571        }
   572 
       
   573    iDeletionHelper.UpdateListIfDeleteHappenedL();
   572    iDeletionHelper.UpdateListIfDeleteHappenedL();
   574    if( currentItemIndex >= 0 && currentItemIndex < iListBox->Model()->NumberOfItems() )
   573    if( currentItemIndex >= 0 && currentItemIndex < iListBox->Model()->NumberOfItems() )
   575        {
   574        {
   576        iListBox->SetCurrentItemIndex(currentItemIndex);
   575        iListBox->SetCurrentItemIndex(currentItemIndex);
   577        }
   576        }   
   578 
       
   579 #endif // RD_SCALABLE_UI_V2
   577 #endif // RD_SCALABLE_UI_V2
       
   578    TRAPD(err,CPosLandmark* landmark = iDb.ReadLandmarkLC(iNewLmkItemId);CleanupStack::PopAndDestroy( landmark ));
       
   579    if (err == KErrNotFound)
       
   580        {
       
   581        LmItemListProvider().RemoveItem( iNewLmkItemId );
       
   582        }      
   580     }
   583     }
   581 
   584 
   582 // -----------------------------------------------------------------------------
   585 // -----------------------------------------------------------------------------
   583 // CLmkAppLmSelectorImpl::GetSelectedLandmarksL
   586 // CLmkAppLmSelectorImpl::GetSelectedLandmarksL
   584 // -----------------------------------------------------------------------------
   587 // -----------------------------------------------------------------------------