mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fix crash when adding a new layer to a collapsed group layer
This commit is contained in:
parent
c6d24d458e
commit
899fa521eb
|
@ -805,9 +805,9 @@ func add_layer(type := 0) -> void:
|
||||||
new_layer_idx = project.current_layer
|
new_layer_idx = project.current_layer
|
||||||
if !current_layer.expanded:
|
if !current_layer.expanded:
|
||||||
current_layer.expanded = true
|
current_layer.expanded = true
|
||||||
for layer_button in Global.layer_vbox.get_children():
|
for layer_button: LayerButton in Global.layer_vbox.get_children():
|
||||||
layer_button.update_buttons()
|
layer_button.update_buttons()
|
||||||
var expanded = project.layers[layer_button.layer].is_expanded_in_hierarchy()
|
var expanded := project.layers[layer_button.layer_index].is_expanded_in_hierarchy()
|
||||||
layer_button.visible = expanded
|
layer_button.visible = expanded
|
||||||
Global.cel_vbox.get_child(layer_button.get_index()).visible = expanded
|
Global.cel_vbox.get_child(layer_button.get_index()).visible = expanded
|
||||||
# make layer child of group
|
# make layer child of group
|
||||||
|
|
Loading…
Reference in a new issue