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/plugins/spatial_editor_plugin.cpp | |
parent | 06c8b5a4ffb0ab6787edf071463f17df522b3e79 (diff) |
Refactor editor icon retrieval
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index e86424ee51..c2554acd49 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -847,11 +847,7 @@ void SpatialEditorViewport::_list_select(Ref<InputEventMouseButton> b) { Spatial *spat = selection_results[i].item; - Ref<Texture> icon; - if (spat->has_meta("_editor_icon")) - icon = spat->get_meta("_editor_icon"); - else - icon = get_icon(has_icon(spat->get_class(), "EditorIcons") ? spat->get_class() : String("Object"), "EditorIcons"); + Ref<Texture> icon = EditorNode::get_singleton()->get_object_icon(spat, "Node"); String node_path = "/" + root_name + "/" + root_path.rel_path_to(spat->get_path()); |