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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 09c69c2a8..c4f778a92 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -194,6 +194,10 @@ void DiveListView::reset()
// If items were selected, inform the selection model
void DiveListView::diveSelectionChanged(const QVector<QModelIndex> &indexes)
{
+ // Since dives are selected dive-by-dive, send only a single signal at the
+ // end, not one for every dive.
+ dontEmitDiveChangedSignal = true;
+
clearSelection();
MultiFilterSortModel *m = MultiFilterSortModel::instance();
QItemSelectionModel *s = selectionModel();
@@ -217,6 +221,9 @@ void DiveListView::diveSelectionChanged(const QVector<QModelIndex> &indexes)
setAnimated(true);
}
}
+
+ dontEmitDiveChangedSignal = false;
+ emit divesSelected();
}
void DiveListView::currentDiveChanged(QModelIndex index)