diff options
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r-- | qt-models/divelistmodel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index 9aa78f344..39f8fbc47 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -3,11 +3,17 @@ #include "core/qthelper.h" #include "core/trip.h" #include "core/settings/qPrefGeneral.h" +#include "core/ssrf.h" // for LOG_STP #include <QDateTime> DiveListSortModel::DiveListSortModel(QObject *parent) : QSortFilterProxyModel(parent) { + setSourceModel(DiveListModel::instance()); + setDynamicSortFilter(true); + setSortRole(DiveListModel::DiveDateRole); + sort(0, Qt::DescendingOrder); updateFilterState(); + LOG_STP("run_ui diveListModel sorted"); } void DiveListSortModel::updateFilterState() |