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 tooltips behaving incorrectly on Tree nodes #82226

Merged

Conversation

YeldhamDev
Copy link
Member

Tooltips within Tree nodes behave awkwardly on Godot 4. Normal ones don't disappear when switching to another item, and custom ones don't even update at all. This PR fixes both cases.

Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

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

A think this makes sense. There is definitely a visible usability improvement, the only question is whether this may lead to some regressions and excessive updates for some tooltip. But I couldn't notice anything from a quick test with the editor.

Old

godot.windows.editor.dev.x86_64_2023-09-28_13-12-01.mp4

New

godot.windows.editor.dev.x86_64_2023-09-28_13-17-32.mp4

@YeldhamDev
Copy link
Member Author

@YuriSizov Well, the way it works is still the same, string comparison. The only difference is that now it's a little more sophisticated.

@YuriSizov
Copy link
Contributor

YuriSizov commented Sep 28, 2023

I'm not so worried about string comparison performance. What I meant is that this changes when we request an update for the tooltip itself. If this somehow could lead to more updates to it than previously and than needed, this would be a performance problem. But we'll see.

@YeldhamDev
Copy link
Member Author

From my tests, it only triggers updates when the tooltip string itself changes, which is what we want to do.

@YuriSizov YuriSizov merged commit 2a31f2d into godotengine:master Sep 28, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@YeldhamDev YeldhamDev deleted the tooltips_doesnt_grow_on_trees branch September 28, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants