Open bvssvni opened 9 years ago
One idea is to use an undo/redo history that allows partial logging through sub actions. Each sub action is reversible. When an error occurs, the action returns Err(())
and the code that calls the action rolls back the sub actions from the incomplete undo action.
Because of https://github.com/PistonDevelopers/editor/issues/11, actions have side effects in the editor state that must be reversible if there is an error.
For example, when attempting to delete a point that referenced from an edge object, there are several possible deletion strategies:
Therefore, the editor might choose to interrupt an action and roll back to previous state.