1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-03-12 22:35:18 +00:00

Fixed linked cel crash and layer naming

This commit is contained in:
OverloadedOrama 2020-06-01 16:56:23 +03:00
parent a9ca858303
commit f246ed1a7a
2 changed files with 3 additions and 3 deletions

View file

@ -554,7 +554,7 @@ func layers_changed(value : Array) -> void:
for i in range(layers.size() - 1, -1, -1):
var layer_container = load("res://src/UI/Timeline/LayerButton.tscn").instance()
layer_container.i = i
if !layers[i].name:
if layers[i].name == tr("Layer") + " 0":
layers[i].name = tr("Layer") + " %s" % i
layers_container.add_child(layer_container)

View file

@ -56,8 +56,8 @@ func _ready() -> void:
if self in l.linked_cels:
# If the linked button is pressed, set as the Image & ImageTexture
# to be the same as the first linked cel
layers[layer_i][0] = l[5][0].layers[layer_i][0]
layers[layer_i][1] = l[5][0].layers[layer_i][1]
layers[layer_i][0] = l.linked_cels[0].layers[layer_i][0]
layers[layer_i][1] = l.linked_cels[0].layers[layer_i][1]
layer_i += 1