diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 13afe44d..1bcf981d 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -2154,9 +2154,7 @@ namespace Volian.Controls.Library else if (p.IndexOf("After") > -1) PasteBeforeOrAfter(MenuSelections.StepAfter, tn, iiClipboard.ItemID); else if (p.IndexOf("Replace") > -1) - { PasteReplace(tn, iiClipboard.ItemID); - } else // paste as child PasteAsChild(tn, iiClipboard.ItemID); this.Cursor = Cursors.Default; @@ -2227,6 +2225,9 @@ namespace Volian.Controls.Library // If parent step is open in step editor, the 'OnPasteItemInfo' event will cause // the item to be pasted in the step editor and the tree. ItemInfo newItemInfo = null; + // F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format + if (!ii.IsProcedure) + ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, false); if (ii.IsProcedure || !OnPasteItemInfo(this, new vlnTreeItemInfoPasteEventArgs(ii, copyStartID, pasteOpt, ii.MyContent.Type))) { // The parent step was not open in the step editor, just paste step (in data) and add treenode. @@ -2251,6 +2252,8 @@ namespace Volian.Controls.Library VETreeNode prevtn = (VETreeNode) tn.PrevNode; VETreeNode partn = (VETreeNode) tn.Parent; ItemInfo ii = tn.VEObject as ItemInfo; + // F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format + ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, true); if (!OnPasteItemInfo(this, new vlnTreeItemInfoPasteEventArgs(ii, copyStartID, ItemInfo.EAddpingPart.Replace, ii.MyContent.Type))) { // first, check if a changeid is required.