From dbda57396b67ec3dd45d403bed3cf8ee100eb654 Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 21 Apr 2021 18:22:43 +0300 Subject: [PATCH] Fix selection_offset not being reset to 0 when the bitmap's position is back to positive coordinates --- src/Classes/Project.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Classes/Project.gd b/src/Classes/Project.gd index eac9a4d54..46e148fb5 100644 --- a/src/Classes/Project.gd +++ b/src/Classes/Project.gd @@ -742,9 +742,13 @@ func resize_bitmap_values(bitmap : BitMap, new_size : Vector2, flip_x : bool, fl if selection_position.x <= 0: self.selection_offset.x = selection_position.x dst.x = 0 + else: + self.selection_offset.x = 0 if selection_position.y <= 0: self.selection_offset.y = selection_position.y dst.y = 0 + else: + self.selection_offset.y = 0 image.lock() image.fill(Color(0)) smaller_image.resize(new_size.x, new_size.y, Image.INTERPOLATE_NEAREST)