public void DuplicateSelectedNode() { var newNode = SelectedNode.Clone(); newNode.Parent.SetChildBelow(newNode, SelectedNode); Runtime.SaveConnectionsAsync(); }
public void DuplicateSelectedNode() { if (SelectedNode == null) { return; } var selectedNodeType = SelectedNode.GetTreeNodeType(); if (selectedNodeType != TreeNodeType.Connection && selectedNodeType != TreeNodeType.Container) { return; } var newNode = SelectedNode.Clone(); SelectedNode.Parent.AddChildBelow(newNode, SelectedNode); newNode.Parent.SetChildBelow(newNode, SelectedNode); }