diff options
author | Zak <zakscomputers@hotmail.com> | 2019-06-28 11:49:24 +0300 |
---|---|---|
committer | Tomasz Chabora <kobewi4e@gmail.com> | 2020-08-29 19:46:52 +0200 |
commit | 7d7727badeb22f838e15ef9a87e644e79199fc0b (patch) | |
tree | 8877fc4b20ed8632f5a66304cc167b776e2d7af7 | |
parent | f10c3810bb0abfa18b1a579ee927f460bf191b6d (diff) |
Adds automatic update for region_rect
When changing the texture region for a StyleBox, the regions was not updating automatically in the Texture editor.
-rw-r--r-- | editor/plugins/texture_region_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | scene/resources/style_box.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 762f42abeb..6e722607f7 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -875,7 +875,7 @@ void TextureRegionEditor::_changed_callback(Object *p_changed, const char *p_pro if (!is_visible()) { return; } - if (p_prop == StringName("atlas") || p_prop == StringName("texture")) { + if (p_prop == StringName("atlas") || p_prop == StringName("texture") || p_prop == StringName("region")) { _edit_region(); } } diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index eb65f10ec9..7328fbdb10 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -245,6 +245,7 @@ void StyleBoxTexture::set_region_rect(const Rect2 &p_region_rect) { region_rect = p_region_rect; emit_changed(); + _change_notify("region"); } Rect2 StyleBoxTexture::get_region_rect() const { |