photosgallery/viewframework/dataprovider/src/glxmedialistmulmodelproviderimpl.cpp
branchRCL_3
changeset 17 a60acebbbd9d
parent 13 bcb43dc84c44
child 23 b023a8d2866a
equal deleted inserted replaced
15:191387a8b767 17:a60acebbbd9d
    98 			{			
    98 			{			
    99 			CMPXCollectionPath* path = iMediaList.PathLC( NGlxListDefs::EPathFocusOrSelection );
    99 			CMPXCollectionPath* path = iMediaList.PathLC( NGlxListDefs::EPathFocusOrSelection );
   100 			iBindingSet->HandleItemChangedL( *path ); 
   100 			iBindingSet->HandleItemChangedL( *path ); 
   101 			CleanupStack::PopAndDestroy( path );
   101 			CleanupStack::PopAndDestroy( path );
   102 			}
   102 			}
       
   103 		iMediaIDForTextureDeletion = iMediaList.Item(iMediaList.FocusIndex()).Id();
   103 	    }
   104 	    }
   104 	    
   105 	    
   105 	if(UString( KListWidget ) == UString(iWidget.widgetName() ) ||  UString( KCoverFlowWidget ) == UString(iWidget.widgetName() ) )
   106 	if(UString( KListWidget ) == UString(iWidget.widgetName() ) ||  UString( KCoverFlowWidget ) == UString(iWidget.widgetName() ) )
   106 	    {
   107 	    {
   107 	    AddWidgetEventHandler();
   108 	    AddWidgetEventHandler();
   173         UpdateItems( aOldIndex, 1 );    
   174         UpdateItems( aOldIndex, 1 );    
   174         UpdateItems( aNewIndex, 1 ); 
   175         UpdateItems( aNewIndex, 1 ); 
   175         }
   176         }
   176 	
   177 	
   177 	CleanupStack::PopAndDestroy( path );
   178 	CleanupStack::PopAndDestroy( path );
       
   179 	// Check for the deletion of a media item and delete the texture of the deleted media item.
       
   180 	// Deleting the texture after removing the item from the mul model and updating the new image.
       
   181 	// Hence the texture deletion is done at a later stage here instead of in HandleItemRemovedL().
       
   182 	if ((aNewIndex == aOldIndex) && (iMediaIDForTextureDeletion.Value()
       
   183             != KGlxInvalidIdValue) || (aNewIndex == KErrNotFound && aOldIndex
       
   184             == 0))
       
   185         {
       
   186         iUiUtility->GlxTextureManager().RemoveTexture(
       
   187                 iMediaIDForTextureDeletion, EFalse);
       
   188         }
       
   189     
       
   190     // Storing the focussed media id for use during the focussed media item deletion operation
       
   191     if (aNewIndex >= 0 && aNewIndex < aList->Count())
       
   192         {
       
   193         iMediaIDForTextureDeletion = aList->Item(aNewIndex).Id();
       
   194         }
       
   195     else
       
   196         {
       
   197         iMediaIDForTextureDeletion.SetValue(KGlxInvalidIdValue);
       
   198         }
   178 	}
   199 	}
   179 
   200 
   180 // ----------------------------------------------------------------------------
   201 // ----------------------------------------------------------------------------
   181 // HandleItemAddedL
   202 // HandleItemAddedL
   182 // ----------------------------------------------------------------------------
   203 // ----------------------------------------------------------------------------