1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Append new linked cells to Global.layers[i][5]

Append the Canvas nodes instead of frame ints
This commit is contained in:
OverloadedOrama 2020-03-18 02:56:29 +02:00
parent 778c86183f
commit fd0069d2e5
2 changed files with 7 additions and 1 deletions

View file

@ -28,6 +28,12 @@ func add_frame() -> void:
Global.undo_redo.add_do_property(c, "visible", false)
Global.undo_redo.add_undo_property(c, "visible", c.visible)
for l_i in range(Global.layers.size()):
if Global.layers[l_i][4]: # If the link button is pressed
# var new_layers : Array = Global.layers.duplicate()
# new_layers[l_i][5].append(new_canvas)
Global.layers[l_i][5].append(new_canvas)
Global.undo_redo.add_undo_property(Global, "canvases", Global.canvases)
Global.undo_redo.add_undo_property(Global, "hidden_canvases", new_hidden_canvases)
Global.undo_redo.add_undo_property(Global, "canvas", Global.canvas)

View file

@ -67,4 +67,4 @@ func _on_LockButton_pressed() -> void:
func _on_LinkButton_pressed() -> void:
Global.layers[i][4] = !Global.layers[i][4]
if !Global.layers[i][5]:
Global.layers[i][5].append(Global.current_frame)
Global.layers[i][5].append(Global.canvas)