math-editor
math-editor copied to clipboard
Undo/Redo Issues
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.
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.
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.