1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

When resizing a selection with gizmos or from the tool options, only set the original_bitmap when we're not already transforming content

This commit is contained in:
Emmanouil Papadeas 2024-01-25 00:59:53 +02:00
parent f8b32762a1
commit de5db85345
2 changed files with 4 additions and 3 deletions

View file

@ -252,7 +252,8 @@ func _on_Size_value_changed(value: Vector2i) -> void:
if timer.is_stopped():
undo_data = selection_node.get_undo_data(false)
selection_node.original_bitmap.copy_from(Global.current_project.selection_map)
if not selection_node.is_moving_content:
selection_node.original_bitmap.copy_from(Global.current_project.selection_map)
timer.start()
selection_node.big_bounding_rectangle.size = value
selection_node.resize_selection()
@ -263,5 +264,5 @@ func _on_Size_ratio_toggled(button_pressed: bool) -> void:
func _on_Timer_timeout() -> void:
if !selection_node.is_moving_content:
if not selection_node.is_moving_content:
selection_node.commit_undo("Move Selection", undo_data)

View file

@ -119,10 +119,10 @@ func _input(event: InputEvent) -> void:
Global.can_draw = false
mouse_pos_on_gizmo_drag = image_current_pixel
dragged_gizmo = gizmo_hover
original_bitmap.copy_from(Global.current_project.selection_map)
if Input.is_action_pressed("transform_move_selection_only"):
transform_content_confirm()
if not is_moving_content:
original_bitmap.copy_from(Global.current_project.selection_map)
if Input.is_action_pressed("transform_move_selection_only"):
undo_data = get_undo_data(false)
temp_rect = big_bounding_rectangle