浏览代码

Merge pull request #95816 from matheusmdx/fix-autocomplete-icon

Fallback to theme icon when no custom icon is set in autocompletion
Rémi Verschelde 1 年之前
父节点
当前提交
fbbc527de6
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      editor/code_editor.cpp

+ 3 - 0
editor/code_editor.cpp

@@ -994,6 +994,9 @@ Ref<Texture2D> CodeTextEditor::_get_completion_icon(const ScriptLanguage::CodeCo
 				tex = get_editor_theme_icon(p_option.display);
 			} else {
 				tex = EditorNode::get_singleton()->get_class_icon(p_option.display);
+				if (!tex.is_valid()) {
+					tex = get_editor_theme_icon(SNAME("Object"));
+				}
 			}
 		} break;
 		case ScriptLanguage::CODE_COMPLETION_KIND_ENUM: