Playlist fixes

- Fix bug resetting playlist view columns to show all when using more than one
playlist.
- Add queue to play next
This commit is contained in:
Jonas Kvinge
2018-11-18 23:21:12 +01:00
parent 7613b2f526
commit 23205bef65
14 changed files with 101 additions and 54 deletions

View File

@@ -36,17 +36,18 @@ namespace PlaylistUndoCommands {
Base::Base(Playlist* playlist) : QUndoCommand(0), playlist_(playlist) {}
InsertItems::InsertItems(Playlist *playlist, const PlaylistItemList &items, int pos, bool enqueue)
InsertItems::InsertItems(Playlist *playlist, const PlaylistItemList &items, int pos, bool enqueue, bool enqueue_next)
: Base(playlist),
items_(items),
pos_(pos),
enqueue_(enqueue)
enqueue_(enqueue),
enqueue_next_(enqueue_next)
{
setText(tr("add %n songs", "", items_.count()));
}
void InsertItems::redo() {
playlist_->InsertItemsWithoutUndo(items_, pos_, enqueue_);
playlist_->InsertItemsWithoutUndo(items_, pos_, enqueue_, enqueue_next_);
}
void InsertItems::undo() {