1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00

Change selection shortcuts: Alt is now used to only move selection and Ctrl+Alt makes a quick copy of the selected content

This commit is contained in:
Manolis Papadeas 2021-07-29 16:03:32 +03:00
parent 1d20295f7d
commit 06bd56866d

View file

@ -77,19 +77,21 @@ func draw_start(position : Vector2) -> void:
if offsetted_pos.x >= 0 and offsetted_pos.y >= 0 and project.selection_bitmap.get_bit(offsetted_pos) and (!Tools.control or Tools.alt) and !Tools.shift and !_ongoing_selection: if offsetted_pos.x >= 0 and offsetted_pos.y >= 0 and project.selection_bitmap.get_bit(offsetted_pos) and (!Tools.control or Tools.alt) and !Tools.shift and !_ongoing_selection:
# Move current selection # Move current selection
_move = true _move = true
if Tools.control and Tools.alt: # Move selection without content if Tools.alt: # Move selection without content
selection_node.transform_content_confirm() if Tools.control: # Move the selection without cutting it from the original position / makes a quick copy of it
_move_content = false _move_content = true
selection_node.move_borders_start()
else:
_move_content = true
if Tools.alt: # Move the selection without cutting it from the original position / makes a quick copy of it
selection_node.transform_content_confirm() selection_node.transform_content_confirm()
selection_node.clear_in_selected_cels = false selection_node.clear_in_selected_cels = false
selection_node.transform_content_start() selection_node.transform_content_start()
if Tools.alt: # Continuation of the above
var cel_image : Image = project.frames[project.current_frame].cels[project.current_layer].image var cel_image : Image = project.frames[project.current_frame].cels[project.current_layer].image
cel_image.blit_rect_mask(selection_node.preview_image, selection_node.preview_image, Rect2(Vector2.ZERO, project.selection_bitmap.get_size()), selection_node.big_bounding_rectangle.position) cel_image.blit_rect_mask(selection_node.preview_image, selection_node.preview_image, Rect2(Vector2.ZERO, project.selection_bitmap.get_size()), selection_node.big_bounding_rectangle.position)
else:
selection_node.transform_content_confirm()
_move_content = false
selection_node.move_borders_start()
else:
_move_content = true
selection_node.transform_content_start()
else: else:
selection_node.transform_content_confirm() selection_node.transform_content_confirm()