diff -r 5b3385a43d68 -r 34937ec34dac photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp --- a/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp Wed Sep 01 12:33:26 2010 +0100 +++ b/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp Tue Sep 14 21:19:17 2010 +0300 @@ -633,6 +633,12 @@ if (iMediaList->FocusIndex() != EGlxListItemAll || iMediaList->IdSpaceId( 0) != KGlxIdSpaceIdRoot) { + // Delete the bitmap; otherwise this memory will be leaked + if (aBitmap) + { + delete aBitmap; + aBitmap = NULL; + } GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL()- Ignore!"); return; } @@ -716,16 +722,6 @@ HBufC* emptyText = StringLoader::LoadLC(R_LIST_EMPTY_VIEW_TEXT); iList->SetEmptyTextL(*emptyText); CleanupStack::PopAndDestroy(emptyText); - - //While coming back to main listview - TGlxIdSpaceId id = iMediaList->IdSpaceId(0); - if((id == KGlxIdSpaceIdRoot) && (mediaCount > 0)) - { - for (TInt i = 0; i < mediaCount; i++) - { - SetDefaultThumbnailL(i); - } - } } //Fix for ESLM-7SAHPT::Clear Flag to Disable QWERTY search input in list view @@ -743,11 +739,18 @@ if (mediaCount) { + TGlxIdSpaceId id = iMediaList->IdSpaceId(0); + for (TInt i=0; iItem(i); iList->ItemL(i).SetTitleL(item.Title()); iList->ItemL(i).SetTextL(item.SubTitle()); + // Set the default TNs for the main listview + if (id == KGlxIdSpaceIdRoot) + { + SetDefaultThumbnailL(i); + } } GLX_DEBUG3("CGlxListViewImp::CreateListL() Medialist Count = %d, " "iLastFocusIndex %d",mediaCount,iLastFocusedIndex); @@ -1167,10 +1170,6 @@ { iProgressIndicator->ShowProgressbarL(); } - else - { - iProgressIndicator->DismissProgressDialog(); - } } }