diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-10-02 11:52:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-02 11:52:45 +0200 |
commit | 911b2ded0cb35fb2a049e32b66b4420f0f65ccc3 (patch) | |
tree | 5cb0bed7ff3d00971dcb0c42d600ce6aef7b3f88 | |
parent | ef50cbc900b1033b09a6e30a6b4cbde36176933a (diff) | |
parent | 35452e1ab44af37378df4d2a827cbdb3a80219a2 (diff) |
Merge pull request #32489 from AlexHolly/fix-script-editor-tooltip
Update ScriptEditor and ShaderEditor Tooltip
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 9d3c580f02..ecb2354aa1 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -814,7 +814,7 @@ void ScriptTextEditor::_code_complete_script(const String &p_code, List<ScriptCo } String hint; Error err = script->get_language()->complete_code(p_code, script->get_path(), base, r_options, r_force, hint); - if (err == OK && hint != "") { + if (err == OK) { code_editor->get_text_edit()->set_code_hint(hint); } } diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index df3e23a9e9..80f63b4f48 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -202,9 +202,7 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptCo if (err != OK) ERR_PRINT("Shaderlang complete failed"); - if (calltip != "") { - get_text_edit()->set_code_hint(calltip); - } + get_text_edit()->set_code_hint(calltip); } void ShaderTextEditor::_validate_script() { |