From 5fa97988b5f8553b9806e5ae86226ebcd4afdece Mon Sep 17 00:00:00 2001 From: Variable <77773850+Variable-ind@users.noreply.github.com> Date: Mon, 11 Nov 2024 02:12:09 +0500 Subject: [PATCH] Fixed unexpected behavior of resize_selection() (#1132) * Fixed unexpected behavior of resize_selection() * Fix typo --------- Co-authored-by: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> --- src/Autoload/ExtensionsApi.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Autoload/ExtensionsApi.gd b/src/Autoload/ExtensionsApi.gd index e120ac9b50d..93b8a8897d3 100644 --- a/src/Autoload/ExtensionsApi.gd +++ b/src/Autoload/ExtensionsApi.gd @@ -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()