Ensure that the correct playlist is played (#5929)

When the playlist doubleclick behavior is set to add songs to the queue,
the playback of the queue also starts if no song is currently
playing. To play the queue from the current playlist, we must set the
active playlist to the current one before starting the playback.

Fixes #5714.
This commit is contained in:
Mattias Andersson 2017-12-14 22:48:03 +01:00 committed by John Maguire
parent 650eb0534a
commit b724291ef9
1 changed files with 1 additions and 0 deletions

View File

@ -1354,6 +1354,7 @@ void MainWindow::PlaylistDoubleClick(const QModelIndex& index) {
app_->playlist_manager()->current()->queue()->ToggleTracks(
dummyIndexList);
if (app_->player()->GetState() != Engine::Playing) {
app_->playlist_manager()->SetActiveToCurrent();
app_->player()->PlayAt(
app_->playlist_manager()->current()->queue()->TakeNext(),
Engine::Manual, true);