Merge pull request #32489 from AlexHolly/fix-script-editor-tooltip

Update ScriptEditor and ShaderEditor Tooltip
This commit is contained in:
Rémi Verschelde 2019-10-02 11:52:45 +02:00 committed by GitHub
commit 911b2ded0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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() {