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:
parent
f8b32762a1
commit
de5db85345
|
@ -252,7 +252,8 @@ func _on_Size_value_changed(value: Vector2i) -> void:
|
||||||
|
|
||||||
if timer.is_stopped():
|
if timer.is_stopped():
|
||||||
undo_data = selection_node.get_undo_data(false)
|
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()
|
timer.start()
|
||||||
selection_node.big_bounding_rectangle.size = value
|
selection_node.big_bounding_rectangle.size = value
|
||||||
selection_node.resize_selection()
|
selection_node.resize_selection()
|
||||||
|
@ -263,5 +264,5 @@ func _on_Size_ratio_toggled(button_pressed: bool) -> void:
|
||||||
|
|
||||||
|
|
||||||
func _on_Timer_timeout() -> 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)
|
selection_node.commit_undo("Move Selection", undo_data)
|
||||||
|
|
|
@ -119,10 +119,10 @@ func _input(event: InputEvent) -> void:
|
||||||
Global.can_draw = false
|
Global.can_draw = false
|
||||||
mouse_pos_on_gizmo_drag = image_current_pixel
|
mouse_pos_on_gizmo_drag = image_current_pixel
|
||||||
dragged_gizmo = gizmo_hover
|
dragged_gizmo = gizmo_hover
|
||||||
original_bitmap.copy_from(Global.current_project.selection_map)
|
|
||||||
if Input.is_action_pressed("transform_move_selection_only"):
|
if Input.is_action_pressed("transform_move_selection_only"):
|
||||||
transform_content_confirm()
|
transform_content_confirm()
|
||||||
if not is_moving_content:
|
if not is_moving_content:
|
||||||
|
original_bitmap.copy_from(Global.current_project.selection_map)
|
||||||
if Input.is_action_pressed("transform_move_selection_only"):
|
if Input.is_action_pressed("transform_move_selection_only"):
|
||||||
undo_data = get_undo_data(false)
|
undo_data = get_undo_data(false)
|
||||||
temp_rect = big_bounding_rectangle
|
temp_rect = big_bounding_rectangle
|
||||||
|
|
Loading…
Reference in a new issue