Use Rect2's get_end().
This commit is contained in:
parent
c1e6c2c49a
commit
c63d51408f
4 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue