mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Selection fixes (#527)
* Fix for multiple cel selection issue Now it will only apply selection to the selected cels that are **visible and unlocked** * Fix for loss of selection data This will hopefully fix the selection data loss on toggling layer buttons
This commit is contained in:
parent
c29254c2e8
commit
75059b5b12
|
@ -472,6 +472,7 @@ func transform_content_confirm() -> void:
|
|||
var frame : int = cel_index[0]
|
||||
var layer : int = cel_index[1]
|
||||
if frame < project.frames.size() and layer < project.layers.size():
|
||||
if Global.current_project.layers[layer].can_layer_get_drawn():
|
||||
var cel_image : Image = project.frames[frame].cels[layer].image
|
||||
var src : Image = preview_image
|
||||
if not is_pasting and not (frame == project.current_frame and layer == project.current_layer):
|
||||
|
|
|
@ -94,15 +94,18 @@ func save_layer_name(new_name : String) -> void:
|
|||
|
||||
|
||||
func _on_VisibilityButton_pressed() -> void:
|
||||
Global.canvas.selection.transform_content_confirm()
|
||||
Global.current_project.layers[layer].visible = !Global.current_project.layers[layer].visible
|
||||
Global.canvas.update()
|
||||
|
||||
|
||||
func _on_LockButton_pressed() -> void:
|
||||
Global.canvas.selection.transform_content_confirm()
|
||||
Global.current_project.layers[layer].locked = !Global.current_project.layers[layer].locked
|
||||
|
||||
|
||||
func _on_LinkButton_pressed() -> void:
|
||||
Global.canvas.selection.transform_content_confirm()
|
||||
Global.current_project.layers[layer].new_cels_linked = !Global.current_project.layers[layer].new_cels_linked
|
||||
if Global.current_project.layers[layer].new_cels_linked && !Global.current_project.layers[layer].linked_cels:
|
||||
# If button is pressed and there are no linked cels in the layer
|
||||
|
|
Loading…
Reference in a new issue