summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/divelistview.cpp')
-rw-r--r--desktop-widgets/divelistview.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 9c5ea8b1c..b669eb077 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -479,8 +479,9 @@ void DiveListView::headerClicked(int i)
unselectDives();
if (currentLayout == DiveTripModel::TREE)
backupExpandedRows();
- reload(newLayout, false);
+ currentLayout = newLayout;
currentOrder = Qt::DescendingOrder;
+ MultiFilterSortModel::instance()->setLayout(newLayout);
sortByColumn(i, currentOrder);
if (newLayout == DiveTripModel::TREE)
restoreExpandedRows();
@@ -490,7 +491,7 @@ void DiveListView::headerClicked(int i)
sortColumn = i;
}
-void DiveListView::reload(DiveTripModel::Layout layout, bool forceSort)
+void DiveListView::reload(DiveTripModel::Layout layout)
{
if (layout == DiveTripModel::CURRENT)
layout = currentLayout;
@@ -499,9 +500,6 @@ void DiveListView::reload(DiveTripModel::Layout layout, bool forceSort)
MultiFilterSortModel::instance()->setLayout(layout);
- if (!forceSort)
- return;
-
sortByColumn(sortColumn, currentOrder);
if (amount_selected && current_dive != NULL)
selectDive(get_divenr(current_dive), true);