{
AppLogDebug("ENTER");
int currentIndex = __pGallery->GetCurrentItemIndex();
+ int shuffleValue = 0;
String strItemText(EMPTY_SPACE);
String strItemIdxText(EMPTY_SPACE);
__pGallery->SetCurrentItemIndex(--currentIndex);
}
+ if (__pPresentationModel->GetFileCount() > 1)
+ {
+ __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER,
+ ENTRY_NAME_IMAGE_VIEWER_SHUFFLE_VALUE, shuffleValue);
+ }
+ if(shuffleValue != 0)
+ {
+ __shuffelStartIndex = __pGallery->GetCurrentItemIndex();
+ if(__pShuffledList != null)
+ {
+ delete __pShuffledList;
+ __pShuffledList = null;
+ }
+ CreateShuffledList(__pPresentationModel->GetFileCount());
+ }
__pGallery->UpdateGallery();
filePath = __pPresentationModel->GetFilePathAt(currentIndex);
__pPresentationModel->RequestImage(filePath);
}
origIndex = __shuffelStartIndex;
- for(int i = count - 1; i > 1; --i)
+ for(int i = count - 1; i > 0; --i)
{
int randomNum = Math::Rand() % (i+1);
int shuffleIndex = __pShuffledList[randomNum];