B2017-255: When pasting a source step that has links to an enhanced step into a section that has linked enhanced steps, do not remove the links to the new enhanced step.
This commit is contained in:
parent
73a52849bc
commit
fc82fced84
@ -880,7 +880,21 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (!pasteItem.IsHigh && !pasteItem.IsCaution && !pasteItem.IsNote) return;
|
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
|
// 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
|
// the RemoveEnhancedFromConfig method clears from the pasted step and any cautions/notes that may be off
|
||||||
// of the pasted step.
|
// of the pasted step.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user