Ticket #30 (closed enhancement: moved)

Opened 13 years ago

Last modified 6 years ago

State logic needs support for invertible operations

Reported by: curtis Owned by: curtis
Priority: critical Milestone: visbio3.50
Component: visbio Severity: serious
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by curtis) (diff)

The undo/redo logic currently functions by saving a snapshot of the current work environment to an XML document in memory, and executing a "restore state" command with the appropriate document when an undo operation is requested.

Unfortunately, restoring from a state document can be extremely slow in many cases. For example, if the state contains 30 MB of overlay data, it does not make sense to sift through all of it, comparing it with the current overlay data, looking for incongruities, merely to undo a single overlay edit.

Rather, such operations are easily invertible with a counter operation; for example, to undo adding a new overlay, merely record onto the stack that the inverse operation is a deletion of that overlay. When an undo or redo operation is requested, the appropriate command or its inverse can be executed quickly.

For non-invertible operations, a warning could be issued stating that a state restoration will be needed to proceed (or perhaps merely stating that "undo will be slow").

Change History

comment:1 Changed 13 years ago by curtis

  • Milestone set to visbio3.5

comment:2 Changed 6 years ago by curtis

  • Status changed from new to closed
  • Resolution set to moved
  • Description modified (diff)
  • Severity set to serious
Note: See TracTickets for help on using tickets.