diff --git a/src/Tools/SelectionShape.gd b/src/Tools/SelectionShape.gd index 34b7579..cc9790c 100644 --- a/src/Tools/SelectionShape.gd +++ b/src/Tools/SelectionShape.gd @@ -202,6 +202,8 @@ func select_rect(merge := true) -> void: queue_free() return merge_multiple_selections(merge) + if not merge: + queue_free() # var undo_data = _get_undo_data(false) # Global.current_project.selected_rect = _selected_rect # commit_undo("Rectangle Select", undo_data) @@ -226,13 +228,15 @@ func merge_multiple_selections(merge := true) -> void: self.local_selected_pixels = selected_pixels_copy else: var arr = Geometry.clip_polygons_2d(selection.polygon, polygon) - if arr.size() == 1: # if the selections intersect + if arr.size() == 0: # if the new selection completely overlaps the current + selection.queue_free() + elif arr.size() == 1: # if the selections intersect selection.set_polygon(arr[0]) var selected_pixels_copy = selection.local_selected_pixels.duplicate() for pixel in local_selected_pixels: selected_pixels_copy.erase(pixel) selection.local_selected_pixels = selected_pixels_copy - queue_free() + func move_start(move_pixel : bool) -> void: if not move_pixel: