Skip to content

Track index in Pref Tree to facilitate automatic scrolling#9549

Merged
colin-grant-work merged 1 commit intomasterfrom
bugfix/scroll-to-in-preferences
Jun 3, 2021
Merged

Track index in Pref Tree to facilitate automatic scrolling#9549
colin-grant-work merged 1 commit intomasterfrom
bugfix/scroll-to-in-preferences

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

Signed-off-by: Colin Grant <colin.grant@ericsson.com>
@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