mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 17:13:23 +00:00
desktop: disable animation when selecting multiple dives
Selecting many dives when the animation was active was increadibly slow, so disable it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b3e4c9c8da
commit
646aead629
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue