From c63d51408fe1ee8d4e57b235c94037732ecf2104 Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Wed, 22 Sep 2021 14:09:45 +0545 Subject: Use Rect2's get_end(). --- editor/plugins/texture_region_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editor/plugins') 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 &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 &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); -- cgit v1.2.3