godot
godot copied to clipboard
Adding a doc comment to an already exported variable is not displayed until the project is reloaded
Godot version
v4.0.alpha.custom_build [c81ef5150]
System information
Windows 11
Issue description
Pull request #62936 added display of doc comments in the inspector, but with a small problem. If you add a doc comment to an already exported variable, it does not appear until the project is reloaded. If you add a doc comment before the variable is exported, and then export it, the doc comment will be displayed immediately.
Upd: 77d3ac7 breaks the display of doc comments in the inspector.
Steps to reproduce
- create variable and export it
- add doc comment
Minimal reproduction project
No response
If you add a doc comment to an already exported variable, it does not appear until the project is reloaded. If you add a doc comment before the variable is exported, and then export it, the doc comment will be displayed immediately.
That means that adding doc comments doesn't invalidate some cache that would trigger an inspector to update, and that https://github.com/godotengine/godot/pull/62936 wasn't a sufficient fix to begin with. Likely, there needs to be a patch for the GDScript module to execute notify_property_list_changed when you change doc comments.
Upd: 77d3ac7 breaks the display of doc comments in the inspector.
It only removed a hack that obfuscated the issue. I'm afraid we're going to find a few of these problems now that it's gone.
Upd: https://github.com/godotengine/godot/commit/77d3ac700d5f528c0393d6aff1306e76f07b0d83 breaks the display of doc comments in the inspector.
This problem should be fixed in #64246, I will fix the current issue in another PR
Per https://github.com/godotengine/godot/pull/64246#issuecomment-1228953314 still experiencing this issue after the fix.
I can't reproduce this in 4.1.beta 33957aee6 (Linux), likely thanks to https://github.com/godotengine/godot/pull/71843.
Agreed with that assessment :)
Fixed by #71843.