From aa2a2bdce86811f1506d063dd766777201568967 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Mon, 3 Jun 2024 20:41:48 +0300 Subject: [PATCH] Immediately disable the delete layer button when locking a layer --- src/UI/Timeline/LayerButton.gd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/UI/Timeline/LayerButton.gd b/src/UI/Timeline/LayerButton.gd index 87e262c0f..aab686f48 100644 --- a/src/UI/Timeline/LayerButton.gd +++ b/src/UI/Timeline/LayerButton.gd @@ -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: