diff options
| author | Rémi Verschelde | 2017-08-01 00:15:37 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-01 00:15:37 +0200 |
| commit | 85088275c5e6db63755e8dfd23d5f53d2d5c96ef (patch) | |
| tree | 370c6f81d373b959148a8a283ddd7fc4fe5bbcf2 /editor/plugins/texture_editor_plugin.cpp | |
| parent | 597ffa03b3399240e806ee524dd3f9725eefb7ab (diff) | |
| parent | f0f407e76eafdfe76b9439c7e527f085a6ff22d9 (diff) | |
| download | godot-85088275c5e6db63755e8dfd23d5f53d2d5c96ef.tar.gz godot-85088275c5e6db63755e8dfd23d5f53d2d5c96ef.tar.zst godot-85088275c5e6db63755e8dfd23d5f53d2d5c96ef.zip | |
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 125d90646..57c27a8a7 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(); } } |
