Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track index in Pref Tree to facilitate automatic scrolling #9549

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

colin-grant-work
Copy link
Contributor

What it does

Fixes #9532 by tracking the index in the tree rather than using the index from the model. Previously, the index used for automatic scrolling didn't match any node in the TreeWidget's display.

Some additional cleanup of the filtering process is possible, but I prefer to defer that to a separate PR after #9439 is merged.

How to test

  1. Expand nodes in the Preference UI tree so that the next expansion could push the node up out of view. (see GIF in The menu jumps when it is expanded in preferences. #9532).
  2. Expand a node.
  3. Observe that it is not pushed out of view.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added preferences issues related to preferences ui/ux issues related to user interface / user experience labels Jun 2, 2021
@colin-grant-work
Copy link
Contributor Author

@shuyaqian, would you mind testing this to ensure it fixes your problem?

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that the tree expansion works much better following the changes.
When expanding nodes in the tree, the automatic scroll no longer pushes the expanded node outside the view 👍

@colin-grant-work colin-grant-work merged commit 1e2c702 into master Jun 3, 2021
@colin-grant-work colin-grant-work deleted the bugfix/scroll-to-in-preferences branch June 3, 2021 14:08
@github-actions github-actions bot added this to the 1.15.0 milestone Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preferences issues related to preferences ui/ux issues related to user interface / user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The menu jumps when it is expanded in preferences.
2 participants