summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-22 14:08:19 +0200
committerGitHub <noreply@github.com>2021-09-22 14:08:19 +0200
commit0f48599ada020292fe4ec0a5b72a5c5c0ef5f76d (patch)
tree0f06d4250c8c7020e2803ec5fbc3ac99f3ff7ed2 /editor/plugins
parent08e455a1f6de9f494422a9084835ce250e8c2738 (diff)
parentc63d51408fe1ee8d4e57b235c94037732ecf2104 (diff)
Merge pull request #52808 from AnilBK/simplify-logic
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 50ad12635b..a0d841ccca 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -344,7 +344,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
r = obj_styleBox->get_region_rect();
}
rect.expand_to(r.position);
- rect.expand_to(r.position + r.size);
+ rect.expand_to(r.get_end());
}
undo_redo->create_action(TTR("Set Region Rect"));
if (atlas_tex.is_valid()) {
@@ -544,7 +544,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
switch (drag_index) {
case 0: {
- Vector2 p = rect_prev.position + rect_prev.size;
+ Vector2 p = rect_prev.get_end();
rect = Rect2(p, Size2());
rect.expand_to(new_pos);
apply_rect(rect);