浏览代码

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

Update ScriptEditor and ShaderEditor Tooltip
Rémi Verschelde 6 年之前
父节点
当前提交
911b2ded0c
共有 2 个文件被更改,包括 2 次插入4 次删除
  1. 1 1
      editor/plugins/script_text_editor.cpp
  2. 1 3
      editor/plugins/shader_editor_plugin.cpp

+ 1 - 1
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);
 	}
 }

+ 1 - 3
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() {