diff options
author | kobewi <kobewi4e@gmail.com> | 2023-07-03 21:29:37 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-07-17 19:35:57 +0200 |
commit | de4a3fa151d2cef139149bb2b878ec8923ba2ce8 (patch) | |
tree | 1a023d3bf44bef9f87522c94c4f951bf164877f5 /editor/plugins/text_shader_editor.cpp | |
parent | 2c552140686b5366e48c61a1a15001f15359cccc (diff) | |
download | redot-engine-de4a3fa151d2cef139149bb2b878ec8923ba2ce8.tar.gz |
Unify and streamline connecting to Resource changes
Diffstat (limited to 'editor/plugins/text_shader_editor.cpp')
-rw-r--r-- | editor/plugins/text_shader_editor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp index 4838661fa8..ed98c7f85c 100644 --- a/editor/plugins/text_shader_editor.cpp +++ b/editor/plugins/text_shader_editor.cpp @@ -122,7 +122,7 @@ void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader, const Stri return; } if (shader.is_valid()) { - shader->disconnect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed)); + shader->disconnect_changed(callable_mp(this, &ShaderTextEditor::_shader_changed)); } shader = p_shader; shader_inc = Ref<ShaderInclude>(); @@ -130,7 +130,7 @@ void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader, const Stri set_edited_code(p_code); if (shader.is_valid()) { - shader->connect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed)); + shader->connect_changed(callable_mp(this, &ShaderTextEditor::_shader_changed)); } } @@ -152,7 +152,7 @@ void ShaderTextEditor::set_edited_shader_include(const Ref<ShaderInclude> &p_sha return; } if (shader_inc.is_valid()) { - shader_inc->disconnect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed)); + shader_inc->disconnect_changed(callable_mp(this, &ShaderTextEditor::_shader_changed)); } shader_inc = p_shader_inc; shader = Ref<Shader>(); @@ -160,7 +160,7 @@ void ShaderTextEditor::set_edited_shader_include(const Ref<ShaderInclude> &p_sha set_edited_code(p_code); if (shader_inc.is_valid()) { - shader_inc->connect(SNAME("changed"), callable_mp(this, &ShaderTextEditor::_shader_changed)); + shader_inc->connect_changed(callable_mp(this, &ShaderTextEditor::_shader_changed)); } } |