summaryrefslogtreecommitdiffstats
path: root/editor/plugins/spatial_editor_plugin.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/spatial_editor_plugin.cpp
parent2aad7f1376897a6cb57471d03169507fac178b42 (diff)
parent5436abefe4f40eb84f96c36ae372df39ec4295d7 (diff)
downloadredot-engine-5961a6da03e70dbfa811c30c4ec684d3a7746bf6.tar.gz
Merge pull request #21717 from willnationsdev/edicon-refactor
Refactor editor icon retrieval
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp6
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());