diff options
author | willnationsdev <willnationsdev@gmail.com> | 2018-09-02 16:40:51 -0500 |
---|---|---|
committer | Will Nations <willnationsdev@gmail.com> | 2018-09-14 09:27:56 -0500 |
commit | 5436abefe4f40eb84f96c36ae372df39ec4295d7 (patch) | |
tree | cc234a2987928ec66221c172d205bc8a90d56f86 /editor/script_editor_debugger.cpp | |
parent | 06c8b5a4ffb0ab6787edf071463f17df522b3e79 (diff) | |
download | redot-engine-5436abefe4f40eb84f96c36ae372df39ec4295d7.tar.gz |
Refactor editor icon retrieval
Diffstat (limited to 'editor/script_editor_debugger.cpp')
-rw-r--r-- | editor/script_editor_debugger.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index b451092709..a28a111025 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -428,8 +428,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da ObjectID id = ObjectID(p_data[i + 3]); it->set_text(0, p_data[i + 1]); - if (has_icon(p_data[i + 2], "EditorIcons")) - it->set_icon(0, get_icon(p_data[i + 2], "EditorIcons")); + Ref<Texture> icon = EditorNode::get_singleton()->get_class_icon(p_data[i + 2], ""); + if (icon.is_valid()) + it->set_icon(0, icon); it->set_metadata(0, id); if (id == inspected_object_id) { |