Example #1
0
        internal static void PasteNodes(Node root)
        {
            var parent  = UserDatabase.selection.node != null ? UserDatabase.selection.node.parent : root;
            var pending = UserClipBoard.Paste() as Node[];

            if (pending != null && pending.Length > 0)
            {
                Command.Execute(new NodeDuplicateThenSelectionCommand(pending, pending.Select(i => parent).ToArray(), root));
            }
        }
Example #2
0
        internal static void CopyNodes(Node root)
        {
            var nodes   = UserDatabase.selection.nodes ?? new Node[0];
            var pending = FilterNested(FilterDuplicated(nodes));

            if (pending.Length > 0)
            {
                pending = Duplicate(pending, root);
                UserClipBoard.Copy(pending);
            }
        }