csharp
public sealed class RemoveNodesCommandTaking some nodes out of a graph, and the wires and group memberships with them.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ One command for the whole selection. Deleting five nodes is one edit and one keystroke puts it back; a composite of five would undo correctly and would fill the history with five entries nobody can read — the same argument SetMembersCommand makes about a multi-object field edit.
Fields and properties (1)
public override string NameWhat this is called in the undo history, as a person would say it.
Methods (3)
public RemoveNodesCommand(NodeGraphModel graph, IEnumerable<NodeId> nodes, EditorDocument? document = null)Describes removing some nodes.
protected override void Apply()Makes the change. Called once on execute and again on every redo.
protected override void Revert()Puts back exactly what Apply changed.
Used by (2)
- CommandTestsVixen.Editor.NodeGraph.Tests
- NodeGraphViewVixen.Editor.NodeGraph