mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:24:44 -04:00
Cloned frames are now automatically part of the tag
The tags don't work with UndoRedo yet, so this is not final behavior
This commit is contained in:
parent
699dfbe091
commit
954b6111c2
2 changed files with 9 additions and 4 deletions
|
@ -102,6 +102,12 @@ func _on_CopyFrame_pressed(frame := -1) -> void:
|
|||
tex.create_from_image(sprite, 0)
|
||||
new_canvas.layers.append([sprite, tex, layer[2]])
|
||||
|
||||
# Loop through the tags to see if the frame is in one
|
||||
for tag in Global.animation_tags:
|
||||
if frame + 1 >= tag[2] && frame + 1 <= tag[3]:
|
||||
tag[3] += 1
|
||||
Global.animation_tags = Global.animation_tags # To execute animation_tags_changed()
|
||||
|
||||
Global.undos += 1
|
||||
Global.undo_redo.create_action("Add Frame")
|
||||
Global.undo_redo.add_do_method(Global, "redo", [new_canvas])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue