diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-05-02 18:14:44 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-03 15:02:21 -0700 |
commit | 769915f3fe75bcef8029e82fdfed7ae206182390 (patch) | |
tree | ab38f02413b4d55d1feafffcd31267b527467cda /desktop-widgets/divelistview.h | |
parent | 51471317011bef1b6e51a42951f61073bb8be905 (diff) | |
download | subsurface-769915f3fe75bcef8029e82fdfed7ae206182390.tar.gz |
selection: create global single_selected_trip() function
The DiveListView had a singleSelectedTrip function that
returns the selected trip if exactly one trip is selected.
This could be very slow if numerous non-trip items were
selected, because all the selection indices were back-
translated by the proxy model.
This could make selection changes very slow, because the
MainTab used said function to determine whether it should
show trip or dive data.. Indeed, with a 3500 dive test log,
when selecting all dives in tree mode, the updating of the
TabWidgets is sped up from 130 ms to 5 ms this commit.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/divelistview.h')
-rw-r--r-- | desktop-widgets/divelistview.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/desktop-widgets/divelistview.h b/desktop-widgets/divelistview.h index 2e15b9064..f1a5eba8d 100644 --- a/desktop-widgets/divelistview.h +++ b/desktop-widgets/divelistview.h @@ -25,7 +25,6 @@ public: ~DiveListView(); void setSortOrder(int i, Qt::SortOrder order); // Call to set sort order void reload(); // Call to reload model data - dive_trip *singleSelectedTrip(); static QString lastUsedImageDir(); static void updateLastUsedImageDir(const QString &s); void loadImages(); |