diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs index 1228a4b4..206c5b00 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs @@ -880,7 +880,21 @@ namespace VEPROMS.CSLA.Library if (!pasteItem.IsHigh && !pasteItem.IsCaution && !pasteItem.IsNote) return; // See if the pasted step's section is enhanced with enhanced steps, and if not, clear it - if (!pasteItem.ActiveSection.IsEnhancedSection && !pasteItem.ActiveSection.IsEnhancedSectionTitleOnly) + // Also, if pasting into a source section, don't clear (B2017-225), the 'isSourceSection' portion of the code. + bool isSourceSection = false; + EnhancedDocuments eds = pasteItem.ActiveSection.GetMyEnhancedDocuments(); + if (eds != null) + { + foreach (EnhancedDocument ed in eds) + { + if (ed.Type != 0) + { + isSourceSection = true; + break; + } + } + } + if (!pasteItem.ActiveSection.IsEnhancedSection && !pasteItem.ActiveSection.IsEnhancedSectionTitleOnly && !isSourceSection) { // the RemoveEnhancedFromConfig method clears from the pasted step and any cautions/notes that may be off // of the pasted step.