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

Tree: Fix offset calculation when there are hidden items #75977

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

timothyqiu
Copy link
Member

Fixes #75929

The incorrect behavior was caused by accumulated vseparation for invisible tree items.

Moving ofs += compute_item_height(it); into the if clause is not necessary because compute_item_height() returns 0 for the same condition. But the code looks clearer ;)

@timothyqiu timothyqiu added bug cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:gui cherrypick:4.0 labels Apr 12, 2023
@timothyqiu timothyqiu added this to the 4.1 milestone Apr 12, 2023
@timothyqiu timothyqiu requested a review from a team as a code owner April 12, 2023 10:00
@akien-mga akien-mga merged commit cd03028 into godotengine:master Apr 12, 2023
@akien-mga
Copy link
Member

Thanks!

@timothyqiu timothyqiu deleted the invisible-item branch April 12, 2023 11:35
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:gui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TreeItem scroll doesn't properly follow selected item when there is hidden items.
3 participants