Udostępnij za pośrednictwem


UndoOption Enum

Definition

This enum controls how the undoable operation is treated on the undo stack.

public enum class UndoOption
public enum UndoOption
type UndoOption = 
Public Enum UndoOption
Inheritance
UndoOption

Fields

Name Value Description
Add 0

Add a new undo unit to the undo stack representing the changes made in the UndoableGraphTransactionScope.

Disable 1

Do not add any undo unit to the undo stack. This is handy for hidden operations on the GraphModel that the user doesn't see.

Merge 2

Try and merge the undo unit with any previous undo unit that has the same undoUnitId. If no matching undo unit is found, this unit is dropped. This is handy for undo units that are a result of something asynchronous happening after the "Add" item has been added. For example, you might add a "MoveNode" unit UndoOption.Add, but then later as the mouse moves you send a series of UndoOption.Merge with the same "MoveNode" id as the Add operation so that all the move operations are rolled up into one atomic undo unit until mouse up is received.

Applies to