(fix) Tracks: avoid GUI lag when restoring large track selections - #15973
Merged
ywwg merged 1 commit intoFeb 26, 2026
Conversation
ronso0
commented
Feb 12, 2026
| } | ||
| } | ||
| pSelectionModel->select(newSelection, | ||
| QItemSelectionModel::Select | QItemSelectionModel::Rows); |
Member
Author
There was a problem hiding this comment.
Note: all this only works because the list returned by QItemSelectionMdel::selectedRows() is sorted by row number
Member
There was a problem hiding this comment.
I was puzzled if this is the case. Can you add this as a source code comment?
Member
Author
There was a problem hiding this comment.
yeah, will add a comment. the docs aren't explicit about this so I looked it up in the Qt sources
selectedRows() and QItemSelectionRange
ronso0
force-pushed
the
tracks-restore-selection-performance-fix
branch
from
February 12, 2026 23:57
54b614d to
a89d377
Compare
ywwg
requested changes
Feb 17, 2026
ronso0
force-pushed
the
tracks-restore-selection-performance-fix
branch
from
February 20, 2026 22:22
a89d377 to
5629def
Compare
ywwg
approved these changes
Feb 23, 2026
Member
Author
|
✔️ and all green. Merge? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To reproduce:
-> enormous GUI lag until/when crate content is loaded
Issue: selecting each row individually fires maaany
selectionChanged()signals and apparently keeps WTrackTableView busy for way too long.Fix: create a
QItemSelectionwith one or more continouosQItemSelectionRanges, then push that to theQItemSelectionModel-> oneselectionChanged()signal