On Wed, 2005-08-10 at 12:44 +0100, Neil Williams wrote: > In order to do redo properly, the undo operation needs to add itself to the > list as an event that includes the state of affected parameter values before > the user clicked undo because the *current* state of any entity would not > exist in the list, only the previous state.
Not necessarily. You could code the system such that each item in the list contains both the before and after values for the entity. Undo then becomes walking the list backward applying "before" state, and redo is walking the list forward applying "after" state. > I'd like to check my logic of how this would work - when a user clicks > "undo" / presses Ctrl-Z 3 times and then restarts editing, the last two > positions in the list need to be freed - but only if the next event is NOT a > redo. Yes? Wouldn't it be the last three positions? Undo/redo shouldn't affect the event list. Any other change discards all events in the list that have been undone but not redone. David _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
