UndoRedo vol 7 - New/Open/Import clear history, Crop has undo/redo

- New, Open and Import now clear undo/redo history
- Crop Image now has undo/redo
- Fixed bug where redo wasn't working properly in multiple frames

Found bug when drawing while animating - undo/redo isn't being registered properly.
This commit is contained in:
OverloadedOrama 2019-11-05 03:14:03 +02:00
parent 18d109f959
commit 8bc0879814
3 changed files with 27 additions and 14 deletions

View file

@ -171,6 +171,9 @@ func undo(canvas : Canvas, layer_index : int = -1) -> void:
else:
for i in canvas.layers.size():
canvas.update_texture(i)
if action_name == "Scale":
canvas.camera_zoom()
print("Undo: ", action_name)
func redo(canvas : Canvas, layer_index : int = -1) -> void:
@ -183,6 +186,9 @@ func redo(canvas : Canvas, layer_index : int = -1) -> void:
else:
for i in canvas.layers.size():
canvas.update_texture(i)
if action_name == "Scale":
canvas.camera_zoom()
print("Redo: ", action_name)
func change_frame() -> void: