mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:24:44 -04:00
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:
parent
18d109f959
commit
8bc0879814
3 changed files with 27 additions and 14 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue