The selected cel (?) is now pressed, based on current layer and frame

All the other buttons are pressed = false. Also removed some legacy code.
This commit is contained in:
OverloadedOrama 2020-03-05 01:53:48 +02:00
parent 87629fdf2f
commit 2a5dfa7ea2
4 changed files with 25 additions and 57 deletions

View file

@ -23,10 +23,7 @@ func add_frame() -> void:
Global.undo_redo.add_do_property(Global, "hidden_canvases", Global.hidden_canvases)
Global.undo_redo.add_do_property(Global, "canvas", new_canvas)
Global.undo_redo.add_do_property(Global, "current_frame", new_canvases.size() - 1)
for i in range(Global.layers.size()):
for child in Global.layers[i][2].get_children():
Global.undo_redo.add_do_property(child, "pressed", false)
Global.undo_redo.add_undo_property(child, "pressed", child.pressed)
for c in Global.canvases:
Global.undo_redo.add_do_property(c, "visible", false)
Global.undo_redo.add_undo_property(c, "visible", c.visible)