aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-04 20:24:16 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-11-05 07:55:53 -0800
commitda3ea59a25890b5992413e80c4260e4350129061 (patch)
treebdf64f4a2629e3c1b379ce8e725c581b2d49fc46 /desktop-widgets/mainwindow.cpp
parent64a1a50e10c4ec8432de9d7cc08921b1b5b490a5 (diff)
downloadsubsurface-da3ea59a25890b5992413e80c4260e4350129061.tar.gz
Dive list: let sort arrows reflect sort order for NR and DATE
The old code always sorted by "ascending" by default. But because users typically want their new dives top, "ascending" was defined for NR and DATE, such that it is actually descending. Turn these around and intitialize these two fields as default-descending. This is possible using the Qt::InitialSortOrderRole role in DiveTripModel::headerData(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 33d954f8d..f5e63851c 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -705,7 +705,7 @@ void MainWindow::cleanUpEmpty()
mainTab->updateDiveInfo(true);
graphics->setEmptyState();
diveList->reload();
- diveList->setSortOrder(DiveTripModel::NR, Qt::AscendingOrder);
+ diveList->setSortOrder(DiveTripModel::NR, Qt::DescendingOrder);
MapWidget::instance()->reload();
if (!existing_filename)
setTitle();