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:
parent
235a32ad11
commit
81f727b6dd
6 changed files with 12 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue