From b5fda06f203e8f713a9cbe0d50df78cf84bc4ada Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 26 Jan 2023 00:44:29 +0100 Subject: Don't change region_rect when setting texture --- editor/plugins/texture_region_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'editor/plugins/texture_region_editor_plugin.cpp') diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 76f2bb7bb5..c5aa60c816 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -740,6 +740,9 @@ void TextureRegionEditor::_update_rect() { } } else if (obj_styleBox.is_valid()) { rect = obj_styleBox->get_region_rect(); + if (rect == Rect2()) { + rect = Rect2(Vector2(), obj_styleBox->get_texture()->get_size()); + } } } -- cgit v1.2.3