stompy.undoer — Framework for handling undo history

Used for grid editing in order to unwind changes to a grid.

Generic support for recording operations, with the option of undoing those operations.

TODO: Allow for commiting only part of the history. Currently commit() discards the entire stack.

Could be better to maintain a linked list of checkpoints, each checkpoint references one before it. Then commiting a checkpoint means deleting its reference to commits before it.

class stompy.undoer.OpHistory[source]

Bases: object

class Checkpoint(serial, frame)[source]

Bases: object

abs_serial = 0
backstep()[source]
checkpoint()[source]
commit()[source]
op_stack = None
op_stack_serial = 17
pop_op()[source]
push_op(meth, *data, **kwdata)[source]
revert(cp)[source]
state = 'inactive'