Skip to content

Commit

Permalink
Fixed unexpected behavior of resize_selection() (#1132)
Browse files Browse the repository at this point in the history
* Fixed unexpected behavior of resize_selection()

* Fix typo

---------

Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
  • Loading branch information
Variable-ind and OverloadedOrama authored Nov 10, 2024
1 parent af703d4 commit 5fa9798
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Autoload/ExtensionsApi.gd
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,10 @@ class SelectionAPI:
Global.canvas.selection.move_borders_start()
else:
Global.canvas.selection.transform_content_start()

if Global.canvas.selection.original_bitmap.is_empty(): # To avoid copying twice.
Global.canvas.selection.original_bitmap.copy_from(Global.current_project.selection_map)

Global.canvas.selection.big_bounding_rectangle.size = new_size
Global.canvas.selection.resize_selection()
Global.canvas.selection.move_borders_end()
Expand Down

0 comments on commit 5fa9798

Please sign in to comment.