Share via


GraphUndoManager.AddOrMerge(IMergeableUndo) Method

Definition

Adds an undo unit to the undo stack, potentially merging it with other undo units on the stack or dropping it if it's empty. If it has UndoOption.AddForce then it will always be added even if it is empty. This is handy for compound operations like moving nodes, drag/drop or label editing where you merge a series of undo units into one atomic unit and you need to have a sure way of starting with the Add unit even if it's initially empty.

public:
 bool AddOrMerge(Microsoft::VisualStudio::GraphModel::IMergeableUndo ^ undo);
public bool AddOrMerge (Microsoft.VisualStudio.GraphModel.IMergeableUndo undo);
member this.AddOrMerge : Microsoft.VisualStudio.GraphModel.IMergeableUndo -> bool
Public Function AddOrMerge (undo As IMergeableUndo) As Boolean

Parameters

undo
IMergeableUndo

The Undo unit to add

Returns

true if the undo unit was added or merged successfully, false if it was disregarded

Applies to