summaryrefslogtreecommitdiff
path: root/editor/plugins/text_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/text_editor.cpp')
-rw-r--r--editor/plugins/text_editor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 5d379fb8b3..3bf4140591 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -30,6 +30,8 @@
#include "text_editor.h"
+#include "editor_node.h"
+
void TextEditor::add_syntax_highlighter(SyntaxHighlighter *p_highlighter) {
highlighters[p_highlighter->get_name()] = p_highlighter;
highlighter_menu->add_radio_check_item(p_highlighter->get_name());
@@ -158,10 +160,7 @@ String TextEditor::get_name() {
Ref<Texture> TextEditor::get_icon() {
- if (get_parent_control() && get_parent_control()->has_icon(text_file->get_class(), "EditorIcons")) {
- return get_parent_control()->get_icon(text_file->get_class(), "EditorIcons");
- }
- return Ref<Texture>();
+ return EditorNode::get_singleton()->get_object_icon(text_file.operator->(), "");
}
RES TextEditor::get_edited_resource() const {