diff options
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 5f6c805173..70b8c3aaa7 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<VisualShader> 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); |