math-editor icon indicating copy to clipboard operation
math-editor copied to clipboard

Undo/Redo Issues

Open MovGP0 opened this issue 4 years ago • 3 comments

Undo/Redo is currently buggy. Do

  • Fix nullability issues
  • Try to identify and fix additional crashes as they happen.

Alternatively implement the following:

  • A command stack to record / rewind / replay user input.
  • A snapshot stack that records snapshots every now and then.
  • Both (for better performance)
  • A control that visualizes the undo/redo history

Note: logging and stack traces might be required to identify the issues.

MovGP0 avatar Aug 07 '21 05:08 MovGP0

I think it would be much better to fully remove undo/redo. It's a hurried implementation and is very hard to maintain and fix. It would be much simpler and easier to simply use the serialization/de-serialization routines instead of working with the current in-memory mechanism. Trying to fix and maintain the current implementation would be a nightmare. Better get rid of it even if it's not available for a while.

kashifimran avatar Aug 07 '21 09:08 kashifimran

We might want to evaluate Undo/Redo frameworks.

MovGP0 avatar Aug 20 '21 05:08 MovGP0

I had a look. I don't think these will be helpful. These solve the easy problem, which is solved in Math Editor i.e. the part that calls undo/redo. The troubled part is the actual code that applies the changes. It was not done very cleanly. If the bugs could be fixed, it will work though. But the related code is hard to understand.

kashifimran avatar Aug 21 '21 05:08 kashifimran