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

Fix phantom tab right button #83296

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

Wierdox
Copy link
Contributor

@Wierdox Wierdox commented Oct 13, 2023

Fixes #83232

Was caused by only updating the right button rb_rect of a tab if the texture was valid. Therefore, it would never be updated when texture is null and so keep its size forever.

Solved by adding a branch to its update logic in TabBar::_draw_tab() to set rb_rect to an empty Rect2.

@Wierdox Wierdox requested a review from a team as a code owner October 13, 2023 23:13
@YeldhamDev YeldhamDev added this to the 4.2 milestone Oct 13, 2023
scene/gui/tab_bar.cpp Outdated Show resolved Hide resolved
@Wierdox Wierdox force-pushed the fix_phantom_tab_right_button branch from 19d962e to 7b33ad3 Compare October 13, 2023 23:34
@akien-mga akien-mga merged commit c106ff8 into godotengine:master Oct 16, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@Wierdox Wierdox deleted the fix_phantom_tab_right_button branch October 25, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Phantom tab button steals input despite texture = null
3 participants