summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelistview.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-26 18:44:59 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-04-26 13:54:59 -0700
commit5d49da5d6b3a16a9f0d08328a5e3dc9b609a1b51 (patch)
treeecfd4fca82a461175b3fd7ea5107a6133d16e4d2 /desktop-widgets/divelistview.h
parentaaecc6e98ef0d4790a2cb0289d3f0634db21a803 (diff)
downloadsubsurface-5d49da5d6b3a16a9f0d08328a5e3dc9b609a1b51.tar.gz
selection: move test for programmatical selection changes to widget
The DiveListView widget has to differentiate between programmatical und user-initiated selection changes. It did so by using the DiveListNotifier::inCommand() flag. However, 1) There is only one point of entry for such selection changes, viz. the MultiFilterSortModel::selectionChanged() signal 2) This signal is not only emitted in command-context. Another source is for example dive-map selection changes. Therefore, move the programmatical-selection-change status down to the widget and set/reset it in the diveSelectionChanged() slot. This makes "select all visible dive sites" somewhat faster. Sadly, not as much as expected. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/divelistview.h')
-rw-r--r--desktop-widgets/divelistview.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop-widgets/divelistview.h b/desktop-widgets/divelistview.h
index e490f1398..9b5d2d7d8 100644
--- a/desktop-widgets/divelistview.h
+++ b/desktop-widgets/divelistview.h
@@ -86,6 +86,7 @@ private:
void contextMenuEvent(QContextMenuEvent *event) override;
void currentChanged(const QModelIndex &current, const QModelIndex &previous) override;
QNetworkAccessManager manager;
+ bool programmaticalSelectionChange;
};
#endif // DIVELISTVIEW_H