BreadthFirstUndo

From Inkscape Wiki
Revision as of 00:39, 27 June 2006 by GigaClon (Talk | contribs) (Categorization)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.