Skip to content

Commit

Permalink
Merge pull request #3740 from uklotzde/last-played-sort-column
Browse files Browse the repository at this point in the history
Add last played sort column
  • Loading branch information
daschuer authored Mar 22, 2021
2 parents 977ef93 + a6855db commit 1cd3aed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/library/basesqltablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ void BaseSqlTableModel::initSortColumnMapping() {
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::SampleRate)] =
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_SAMPLERATE);
m_columnIndexBySortColumnId[static_cast<int>(
TrackModel::SortColumnId::LastPlayedAt)] =
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_LAST_PLAYED_AT);

m_sortColumnIdByColumnIndex.clear();
for (int i = static_cast<int>(TrackModel::SortColumnId::IdMin);
Expand Down
1 change: 1 addition & 0 deletions src/library/basetracktablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ class BaseTrackTableModel : public QAbstractTableModel, public TrackModel {
/// COLUMN_LIBRARYTABLE_COVERART_COLOR: mixxx::RgbColor::code_t (pass-through)
/// COLUMN_LIBRARYTABLE_COVERART_DIGEST: QByteArray (pass-through)
/// COLUMN_LIBRARYTABLE_COVERART_HASH: quint16 (pass-through)
/// COLUMN_LIBRARYTABLE_LAST_PLAYED_AT: QDateTime
/// COLUMN_PLAYLISTTABLE_DATETIMEADDED: QDateTime
virtual QVariant rawValue(
const QModelIndex& index) const;
Expand Down

0 comments on commit 1cd3aed

Please sign in to comment.