complemented condition inside reshuffleindices function to take into account the selected track
This commit is contained in:
parent
0976cc7e5c
commit
56fc242520
@ -1914,8 +1914,10 @@ void Playlist::ReshuffleIndices() {
|
||||
std::random_shuffle(shuffled_album_keys.begin(),
|
||||
shuffled_album_keys.end());
|
||||
|
||||
// If the user is currently playing a song, force its album to be first.
|
||||
if (current_virtual_index_ != -1) {
|
||||
// If the user is currently playing a song, force its album to be first
|
||||
// Or if the song was not playing but it is selected, force its album
|
||||
// to be first.
|
||||
if (current_virtual_index_ != -1 || current_row() != -1) {
|
||||
const QString key = items_[current_row()]->Metadata().AlbumKey();
|
||||
const int pos = shuffled_album_keys.indexOf(key);
|
||||
if (pos >= 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user