B2024-059: Paste source section has bad links. #391
@ -951,7 +951,10 @@ namespace VEPROMS.CSLA.Library
|
||||
// it is pasted into a section without enhanced data, then clear it.
|
||||
|
||||
// config data can only be on hls/notes/cautions for pasted steps.
|
||||
if (!pasteItem.IsHigh && !pasteItem.IsCaution && !pasteItem.IsNote) return;
|
||||
// B2024-059: clear links on a source section. When a paste occurs, the section is copied with the links but not
|
||||
// new section is created in the enhanced document, so the links point to the original section (copied). These
|
||||
// need to be removed.
|
||||
if (!pasteItem.IsHigh && !pasteItem.IsCaution && !pasteItem.IsNote && !pasteItem.IsSection) return;
|
||||
|
||||
// See if the pasted step's section is enhanced with enhanced steps, and if not, clear it
|
||||
// Also, if pasting into a source section, don't clear (B2017-225), the 'isSourceSection' portion of the code.
|
||||
@ -974,6 +977,12 @@ namespace VEPROMS.CSLA.Library
|
||||
// of the pasted step.
|
||||
if (pasteItem.HasEnhancedLinkedStep) pasteItem.RemoveEnhancedFromConfig();
|
||||
}
|
||||
// B2024-059: clear links on a source section
|
||||
if (isSourceSection)
|
||||
{
|
||||
EnhancedDocuments seleds = pasteItem.GetMyEnhancedDocuments();
|
||||
foreach (EnhancedDocument ed in seleds) pasteItem.DoUnlinkEnhanced(pasteItem, ed.Type, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Insert Child
|
||||
|
Loading…
x
Reference in New Issue
Block a user