-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Principle
This allows users to cherry-pick on command to undo in the history. Undoing such a picked command does not undo all the command performed after, i.e. it is not an n-time undo operation.
Selective undo history can be linear or tree-based.
Note that the behavior of the undo algorithm may depend on the semantics of the command.
Some commands of the same type, if executed successively, are cumulative. Example: a move command (drawing app) based on a translation vector (relative position).
Similarly, some commands replace. Examples: a move command based on a absolute position; changing the color of a shape.
With replacing commands, eg two change color commands on the same object (so regional history too), if the user undoes the first change color command, what to do with the next ones? And how to redo this command (and reinsert of related commands)?
Challenges
Conflicts/dependencies between commands
Example 1: drawing app. The user moves two times a shape. Then the user cherry-pick the first move command and undoes it. What happens to the second move command since it depends on the first one?