mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgplaylisthelper.cpp
branchRCL_3
changeset 9 13afc0e517bd
parent 0 ff3acec5bc43
child 11 943ff5625028
--- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgplaylisthelper.cpp	Tue Feb 02 00:09:33 2010 +0200
+++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgplaylisthelper.cpp	Fri Feb 19 22:48:30 2010 +0200
@@ -172,20 +172,20 @@
 
     if (!iIsInitializing)
         {
-		if (aEnableShuffle)
-			{
-			TTime time;
-			time.UniversalTime();
-			TInt64 seed = time.Int64();
-			TInt randIndex = Math::Rand(seed) % aPath.Count();
-			aPath.Set(randIndex);
-			}
-
         CMPXCollectionPlaylist* playlist = CMPXCollectionPlaylist::NewL( aPath );
         CleanupStack::PushL( playlist );
+        
+        if (aEnableShuffle)
+            {
+            TTime time;
+            time.UniversalTime();
+            TInt64 seed = time.Int64();
+            TInt randIndex = Math::Rand(seed) % aPath.Count();
+            aPath.Set(randIndex);
+            playlist->SetShuffleEnabledL( aEnableShuffle );
+            iPlaybackUtility->SetL( EPbPropertyRandomMode, aEnableShuffle );
+            }
 
-        playlist->SetShuffleEnabledL( aEnableShuffle );
-        iPlaybackUtility->SetL( EPbPropertyRandomMode, aEnableShuffle );
         iPlaybackUtility->InitL( *playlist, ETrue );
         CleanupStack::PopAndDestroy( playlist );