Open MovGP0 opened 3 years ago
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.
We might want to evaluate Undo/Redo frameworks.
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.
Undo/Redo is currently buggy. Do
Alternatively implement the following:
Note: logging and stack traces might be required to identify the issues.