pencil2d / pencil

Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
http://pencil2d.org
GNU General Public License v2.0
1.47k stars 273 forks source link

Undoing drawing over various frames will permanently delete frame content #1687

Closed Jose-Moreno closed 2 years ago

Jose-Moreno commented 2 years ago

Issue Summary

This is an issue related to the undo that I think it's quite critical and can occur a lot for most users. The problem that happens is that if you undo beyond a two step threshold, the frames content will be erased permanently. I've tried this by creating new frames and drawing over existing frame containers, but the result is the same.

Video or Image Reference

https://www.youtube.com/watch?v=mind6giVf_Y

Note: From 0:32 to 1:16 I mention a UX issue with the undo shortcut that has been in the software for a long time and it drives me crazy. I'll report that separately.

Expected Results

Invoking the redo function should accurately recover the strokes or drawings that were "erased" after invoking the Undo function, otherwise we can't trust this functionality when it comes to gauging variations in the work, or worse when we thought we might have been wrong, but decided to keep going, after we redo the work everything else is lost.

Steps to reproduce

  1. Create at least 5 frames to see the effects of the issue
  2. Draw on each separate frame a single stroke
  3. Undo all frames to notice the effect
  4. Redo the last 5 frames you undid. Notice you'll only get back the last action / frame worth of content

System Information

commit: 91b1721baef012d49cffd0d23358524a420af9fd date: 2021-11-14_16:46:59

Operating System: Windows 10 Version 2009 CPU Architecture: x86_64 Qt Version: 5.15.2

Jose-Moreno commented 2 years ago

Hey guys I've been testing the latest nightlies, it seem this issue is exactly the same as before in the latest builds from october. could it be a regression?

Doing the same reproduction steps as the OP leads to have all the redo steps content to get be lost when redoing. It's happening consistently for me too 100% of the time.

Nightly Build Oct 16 2022

commit: 3e4adb09392be29fb5161d868ee4e41f510761f5
date: 2022-10-16_15:38:42

Operating System: Windows 10 Version 2009
CPU Architecture: x86_64
Qt Version: 5.15.2

I noticed this because yesterday I got an issue where undoing a move tool transform step literally lost the redo step for the position transformation, though the drawing steps were preserved at the end. So all the undo steps are getting lost regardless of functionality, though they still show on the edit menu actions like before, they do nothing.