private void MultiNodeAction(object sender, BonsaiInput.NodeContext actionType) { switch (actionType) { case BonsaiInput.NodeContext.DuplicateSelection: var duplicates = EditorNodeCreation.DuplicateMultiple(Canvas, NodeSelection.SelectedNodes); NodeSelection.SetMultiSelection(duplicates); break; case BonsaiInput.NodeContext.DeleteSelection: Canvas.Remove(node => NodeSelection.IsNodeSelected(node)); NodeSelection.SetTreeSelection(Canvas.Tree); break; } }
private void MultiNodeAction(object sender, BonsaiInput.NodeContext actionType) { switch (actionType) { case BonsaiInput.NodeContext.DuplicateSelection: var duplicates = EditorNodeCreation.DuplicateMultiple(Canvas, NodeSelection.SelectedNodes); NodeSelection.SetMultiSelection(duplicates); break; case BonsaiInput.NodeContext.DeleteSelection: RemoveSelectedNodes(); break; } UpdateAbortableSelection(); }