1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

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
6 changed files with 12 additions and 9 deletions

View File

@@ -1422,7 +1422,8 @@ void ScriptTextEditor::_show_symbol_tooltip(const String &p_symbol, int p_row, i
}
if (p_symbol.begins_with("res://") || p_symbol.begins_with("uid://")) {
EditorHelpBitTooltip::show_tooltip(code_editor->get_text_editor(), "resource||" + p_symbol);
Control *tmp = EditorHelpBitTooltip::make_tooltip(code_editor->get_text_editor(), "resource||" + p_symbol);
memdelete(tmp);
return;
}
@@ -1532,7 +1533,8 @@ void ScriptTextEditor::_show_symbol_tooltip(const String &p_symbol, int p_row, i
}
if (!doc_symbol.is_empty() || !debug_value.is_empty()) {
EditorHelpBitTooltip::show_tooltip(code_editor->get_text_editor(), doc_symbol, debug_value, true);
Control *tmp = EditorHelpBitTooltip::make_tooltip(code_editor->get_text_editor(), doc_symbol, debug_value, true);
memdelete(tmp);
}
}