mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
64a1a50e10
commit
da3ea59a25
2 changed files with 10 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue