summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-26 23:52:19 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-26 23:52:19 +0100
commit3b086aa062068f4d866b2207bb5b5770e40aafac (patch)
tree7e4a3593b6b47e07772a5586af015e9ce5c8cd32 /editor
parentcf8fc5c9a472a519d0cabee349fca10b22df769c (diff)
parentb5fda06f203e8f713a9cbe0d50df78cf84bc4ada (diff)
Merge pull request #72086 from KoBeWi/set_rekt
Don't change region_rect when setting texture
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp3
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());
+ }
}
}