diff options
author | kobewi <kobewi4e@gmail.com> | 2023-01-26 00:44:29 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-01-26 23:02:26 +0100 |
commit | b5fda06f203e8f713a9cbe0d50df78cf84bc4ada (patch) | |
tree | 0f97504a4bf7df21e258b52241193dbc9b69d5e7 /editor/plugins/texture_region_editor_plugin.cpp | |
parent | 63b5adf8a85f6f2f222d048bd4975490b6afd9a8 (diff) |
Don't change region_rect when setting texture
Diffstat (limited to 'editor/plugins/texture_region_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/texture_region_editor_plugin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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()); + } } } |