Difference between revisions of "BreadthFirstUndo"

From Inkscape Wiki
Jump to navigation Jump to search
(Categorization)
 
(No difference)

Latest revision as of 00:39, 27 June 2006

ok, breadth first undo:

  • Take a document with an oval and a square
  • Resize the oval.
  • Move the square.
  • Set the oval's stroke width

Normal undo would undo the square, then the oval.

Breadth first undo would allow the user to undo either the square or the oval. The edits in the document can be considered a sequence of parallel edits, the order of undo on any particular element is only defined by edits on it, or on something that affects it. The undo history becomes:

 New document
   New oval
     Resize oval
       Set stroke
   New square
     Move square

Another way to change undo is to provide a branch in the history whenever an undo followed by an edit occurs. For example,

  • Take a document with an oval and a square
  • Resize the oval.
  • Move the square.
  • Set the oval's stroke width
  • undo, undo
  • add spiral

The history of this document could be displayed like this:

 Resize oval
   Move square
     Set oval stroke width
 Add spiral

The two concepts can be merged to give an edit tree for each object in the document, the traditional undo being threaded through the tree.