diff -r 2a40e88564c8 -r 13afc0e517bd mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgplaylisthelper.cpp --- 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 );