diff options
Diffstat (limited to 'editor/plugins/texture_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/texture_editor_plugin.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index 125d906460..57c27a8a7e 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -102,14 +102,24 @@ void TextureEditor::_notification(int p_what) { } } +void TextureEditor::_changed_callback(Object *p_changed, const char *p_prop) { + + if (!is_visible()) + return; + update(); +} + void TextureEditor::edit(Ref<Texture> p_texture) { + if (!texture.is_null()) + texture->remove_change_receptor(this); + texture = p_texture; - if (!texture.is_null()) + if (!texture.is_null()) { + texture->add_change_receptor(this); update(); - else { - + } else { hide(); } } |