mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Desktop: Improve speed of selecting multiple (or all) dives
When selecting all dives via CTRL-A or manually and the trips were not expanded, the QSelectionModel sends a single selectionChanged signal per trip. We are reloading the map in every call, making this very slow. I couldn't figure out how to make QSelectionModel behave more nicely, therefore I chose the nuclear option: Remove the map reloading from selectionChanged() and hook into all functions that do selection changes. In these functions, first call the original code and then do the selection-changed operations. This will certainly need some tuning. Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7d77db96e3
commit
4928c4ae04
3 changed files with 42 additions and 33 deletions
|
|
@ -70,6 +70,9 @@ slots:
|
|||
void filterFinished();
|
||||
void tripChanged(dive_trip *trip, TripField);
|
||||
private:
|
||||
void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags flags) override;
|
||||
void selectAll() override;
|
||||
void selectionChangeDone();
|
||||
bool mouseClickSelection;
|
||||
QList<int> expandedRows;
|
||||
DiveTripModelBase::Layout currentLayout;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue