Fix the returned controls of EditorHelpBitTooltip::show_tooltip() were not freed in ScriptTextEditor

The returned control is an orphan node, which is to make the standard tooltip invisible.
This commit is contained in:
风青山 2025-11-23 21:42:48 +08:00
parent 235a32ad11
commit 81f727b6dd
No known key found for this signature in database
GPG key ID: 8DFDAA198ED5EDF5
6 changed files with 12 additions and 9 deletions

View file

@ -380,7 +380,8 @@ protected:
void _notification(int p_what);
public:
static Control *show_tooltip(Control *p_target, const String &p_symbol, const String &p_prologue = String(), bool p_use_class_prefix = false);
// The returned control is an orphan node, which is to make the standard tooltip invisible.
[[nodiscard]] static Control *make_tooltip(Control *p_target, const String &p_symbol, const String &p_prologue = String(), bool p_use_class_prefix = false);
void popup_under_cursor();