mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Fix selection being moved by one pixel when being resized & temp_rect has negative size
This commit is contained in:
parent
ae48907660
commit
83d9800fc1
|
@ -204,7 +204,14 @@ func gizmo_resize() -> void:
|
|||
temp_rect = temp_rect.grow_individual(left, top, right, bottom)
|
||||
big_bounding_rectangle = temp_rect.abs()
|
||||
big_bounding_rectangle.position = big_bounding_rectangle.position.ceil()
|
||||
self.big_bounding_rectangle.size = big_bounding_rectangle.size.ceil()
|
||||
big_bounding_rectangle.size = big_bounding_rectangle.size.floor()
|
||||
if big_bounding_rectangle.size.x == 0:
|
||||
big_bounding_rectangle.size.x = 1
|
||||
if big_bounding_rectangle.size.y == 0:
|
||||
big_bounding_rectangle.size.y = 1
|
||||
|
||||
self.big_bounding_rectangle = big_bounding_rectangle # Call the setter method
|
||||
|
||||
var size = big_bounding_rectangle.size.abs()
|
||||
preview_image.copy_from(original_preview_image)
|
||||
preview_image.resize(size.x, size.y, Image.INTERPOLATE_NEAREST)
|
||||
|
|
Loading…
Reference in a new issue