From 702b6a00d8a59d385561f5a65e8b49ed0bf3cefb Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Wed, 20 Jul 2022 12:44:00 +0300 Subject: [PATCH] Fix icons not loaded correctly in the visual shader editor --- editor/plugins/shader_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 5f6c805173f..70b8c3aaa77 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -889,12 +889,12 @@ void ShaderEditorPlugin::edit(Object *p_object) { Ref vs = es.shader; if (vs.is_valid()) { es.visual_shader_editor = memnew(VisualShaderEditor); - es.visual_shader_editor->edit(vs.ptr()); shader_tabs->add_child(es.visual_shader_editor); + es.visual_shader_editor->edit(vs.ptr()); } else { es.shader_editor = memnew(ShaderEditor); - es.shader_editor->edit(s); shader_tabs->add_child(es.shader_editor); + es.shader_editor->edit(s); } shader_tabs->set_current_tab(shader_tabs->get_tab_count() - 1); edited_shaders.push_back(es);