Skip to content

Commit

Permalink
fix [Library], AutoDjAddBottom/Top ControlObjects
Browse files Browse the repository at this point in the history
These were broken in mixxxdj#2612.
  • Loading branch information
Be-ing committed Jul 12, 2020
1 parent 0815bcb commit bca579f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/widget/wtracktableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,18 @@ void WTrackTableView::addToAutoDJ(PlaylistDAO::AutoDJSendLoc loc) {
playlistDao.addTracksToAutoDJQueue(trackIds, loc);
}

void WTrackTableView::slotAddToAutoDJBottom() {
addToAutoDJ(PlaylistDAO::AutoDJSendLoc::BOTTOM);
}

void WTrackTableView::slotAddToAutoDJTop() {
addToAutoDJ(PlaylistDAO::AutoDJSendLoc::TOP);
}

void WTrackTableView::slotAddToAutoDJReplace() {
addToAutoDJ(PlaylistDAO::AutoDJSendLoc::REPLACE);
}

void WTrackTableView::doSortByColumn(int headerSection, Qt::SortOrder sortOrder) {
TrackModel* trackModel = getTrackModel();
QAbstractItemModel* itemModel = model();
Expand Down
4 changes: 4 additions & 0 deletions src/widget/wtracktableview.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class WTrackTableView : public WLibraryTableView {
void slotUnhide();
void slotPurge();

void slotAddToAutoDJBottom() override;
void slotAddToAutoDJTop() override;
void slotAddToAutoDJReplace() override;

private slots:
void doSortByColumn(int headerSection, Qt::SortOrder sortOrder);
void applySortingIfVisible();
Expand Down

0 comments on commit bca579f

Please sign in to comment.