mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgplaylisthelper.cpp
branchRCL_3
changeset 17 c8156a91d13c
parent 14 943ff5625028
child 50 26a1709b9fec
--- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgplaylisthelper.cpp	Mon Mar 15 12:40:11 2010 +0200
+++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgplaylisthelper.cpp	Wed Mar 31 21:26:33 2010 +0300
@@ -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 );