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

Export variables' tooltips need a scene refresh to show up (eg. move to another scene and come back) #79967

Open
Pacomatic1 opened this issue Jul 27, 2023 · 2 comments

Comments

@Pacomatic1
Copy link

Pacomatic1 commented Jul 27, 2023

Godot version

v4.1.stable.official [9704596]

System information

Godot v4.1.stable - Windows 10.0.19045 - Vulkan (Compatibility) - Intel(R) HD Graphics 4600 (Intel Corporation; 20.19.15.4531) - Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz (4 Threads)

Issue description

When I make an exported variable, and give it a custom tooltip, It doesn't automatically show up, no matter how long I wait.
But if I were to reload the node (eg. restart the editor, or inspect another node and come back) or save the script then it does show up. This also happens when you change the tooltip.

On its own, there is nothing wrong with this. However, if I were to make another export variable, for example, it WOULD show up without a manual reload, or a save. As such, the issue is simply that it's inconsistent; why would adding a new export variable show up, but a simple tooltip need a reload or a save?

I presume this is an easy fix: Just update the tooltip at the same time as when you update export variables.

Steps to reproduce

Easiest way to reproduce:
Make a new Node (Type: Node)
Add a script.
Paste:

extends Node
## Wow! Tooltips!
@export TEST: bool

Hover over the exported variable.
You shall see there is no description despite you typing one.
But if you make a new scene for a moment, return to the old one, and hover over the variable, it'll show up.

You can also change the tooltip again, and see it won't update unless you save the script.

Minimal reproduction project

N/A

@dalexeev
Copy link
Member

I confirm this for 4.1.1. I also noticed that until you save the script, changing the scene doesn't help. But when you save the script and switch the scene tab, the descriptions appear.

CC @anvilfolk @Rindbee

@Rindbee
Copy link
Contributor

Rindbee commented Jul 27, 2023

#71843 does not completely solve the related issue, it requires additional work: update the document information before updating the tree (or call EditorInspector::update_tree() once after updating the document).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants