diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 99d94191..2224c20b 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -1514,7 +1514,7 @@ namespace Volian.Controls.Library // can do Before/After - no links exist in pasted step, treat like an insert.. // cannot do Replace // 3) 'to' step is 'source' and 'from' step is same docversion 'source' - // can do Before/After/Replace + // can do Before/After/Replace (Note that replace is not allowed per B2017-183) StepConfig stpToCfg = iiPasteHere.MyConfig as StepConfig; StepConfig stpFromCfg = iiClipboard.MyConfig as StepConfig; @@ -1529,7 +1529,11 @@ namespace Volian.Controls.Library stpCanPaste = true; okToReplace = false; } - else if (stpToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) stpCanPaste = true; // 3) + else if (stpToIsSource && iiPasteHere.MyDocVersion.VersionID == iiClipboard.MyDocVersion.VersionID) // 3 + { + stpCanPaste = true; + if (stpFromIsSource) okToReplace = false; // B2017-183: don't allow a replace to source steps + } if (iiClipboard.IsRtfRaw) stpCanPaste = false; // never paste an equation. if (stpCanPaste && AddToInsertMenu(iiPasteHere, 0)) cm.MenuItems.Add("Paste Step Before", new EventHandler(mi_Click)); if (stpCanPaste && okToReplace) cm.MenuItems.Add("Replace Existing Step", new EventHandler(mi_Click));