Merge pull request #30148 from zaksnet/fix-texture-editor

Adds automatic update for StyleBoxTexture > region_rect
This commit is contained in:
Rémi Verschelde 2020-08-31 13:25:28 +02:00 committed by GitHub
commit 74dbcf1e4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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();
}
}

View file

@ -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 {