summaryrefslogtreecommitdiff
path: root/editor/plugins/text_editor.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-09-14 17:24:04 +0200
committerGitHub <noreply@github.com>2018-09-14 17:24:04 +0200
commit5961a6da03e70dbfa811c30c4ec684d3a7746bf6 (patch)
tree8c5eb977e7a417f978e1ef39b9f3cacd4397e799 /editor/plugins/text_editor.cpp
parent2aad7f1376897a6cb57471d03169507fac178b42 (diff)
parent5436abefe4f40eb84f96c36ae372df39ec4295d7 (diff)
Merge pull request #21717 from willnationsdev/edicon-refactor
Refactor editor icon retrieval
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 {