summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--desktop-widgets/divelistview.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8091cf863..430e62a62 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,4 @@
+- desktop: make selection of multiple dives reasonable fast
- mobile: add GF fields to adjust Buhlmann algorithm parameters for calculated ceiling
- undo: save to git after editing weights [#3159]
- undo: reset dive-mode on undo of set-point addition
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index c08998e5f..94acfc8d2 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -248,11 +248,16 @@ void DiveListView::diveSelectionChanged(const QVector<QModelIndex> &indices)
if (std::find(affectedTrips.begin(), affectedTrips.end(), row) == affectedTrips.end())
affectedTrips.push_back(row);
}
+ // Disable animations when expanding trips. Otherwise, selection of
+ // a large number of dives becomes increadibly slow.
+ bool oldAnimated = isAnimated();
+ setAnimated(false);
MultiFilterSortModel *m = MultiFilterSortModel::instance();
for (int row: affectedTrips) {
QModelIndex idx = m->index(row, 0);
expand(idx);
}
+ setAnimated(oldAnimated);
selectionChangeDone();
programmaticalSelectionChange = false;