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

Immediately disable the delete layer button when locking a layer

This commit is contained in:
Emmanouil Papadeas 2024-06-03 20:41:48 +03:00
parent 14e73ae33b
commit aa2a2bdce8

View file

@ -186,6 +186,11 @@ func _on_lock_button_pressed() -> void:
if Global.select_layer_on_button_click:
_select_current_layer()
_update_buttons_all_layers()
var child_count := layer.get_child_count(true)
Global.disable_button(
Global.animation_timeline.remove_layer,
layer.is_locked_in_hierarchy() or Global.current_project.layers.size() == child_count + 1
)
func _on_link_button_pressed() -> void: