B2024-075 Correct Linking and Numbering when utilizing Paste Before and Paste After with Enhanced Steps as well as some related UI refresh issues.
This commit is contained in:
@@ -1876,6 +1876,10 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsCaution) enhType = 20006;
|
||||
return enhType;
|
||||
}
|
||||
|
||||
// B2024-075: Paste Before/After with Enhanced Documents is creating situation
|
||||
//where Background item is linked to Source but Source is not linked to Background
|
||||
//When Fixing the linking, need to not create a duplicate link if one already exists
|
||||
public void DoCreateLinksEnhancedSingleItem(ItemInfo enhii, int enhtype)
|
||||
{
|
||||
// Link the 2 items, srcII & enhii:
|
||||
@@ -1893,12 +1897,15 @@ namespace VEPROMS.CSLA.Library
|
||||
using (Item ei = Item.Get(enhii.ItemID))
|
||||
{
|
||||
StepConfig sc = enhii.MyConfig as StepConfig;
|
||||
sc.AddEnhancedDocument(0, this.ItemID);
|
||||
sc.SaveEnhancedDocuments();
|
||||
ei.MyContent.Text = DisplayText;
|
||||
ei.MyContent.Config = sc.ToString();
|
||||
ei.Save();
|
||||
enhii.RefreshConfig();
|
||||
if (!sc.MyEnhancedDocuments.Exists(x => x.Type == 0))
|
||||
{
|
||||
sc.AddEnhancedDocument(0, this.ItemID);
|
||||
sc.SaveEnhancedDocuments();
|
||||
ei.MyContent.Text = DisplayText;
|
||||
ei.MyContent.Config = sc.ToString();
|
||||
ei.Save();
|
||||
enhii.RefreshConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (IsSection)
|
||||
@@ -1916,12 +1923,15 @@ namespace VEPROMS.CSLA.Library
|
||||
using (Item ei = Item.Get(enhii.ItemID))
|
||||
{
|
||||
SectionConfig sc = enhii.MyConfig as SectionConfig;
|
||||
sc.AddEnhancedDocument(0, this.ItemID);
|
||||
sc.SaveEnhancedDocuments();
|
||||
ei.MyContent.Text = DisplayText;
|
||||
ei.MyContent.Config = sc.ToString();
|
||||
ei.Save();
|
||||
enhii.RefreshConfig();
|
||||
if (!sc.MyEnhancedDocuments.Exists(x => x.Type == 0))
|
||||
{
|
||||
sc.AddEnhancedDocument(0, this.ItemID);
|
||||
sc.SaveEnhancedDocuments();
|
||||
ei.MyContent.Text = DisplayText;
|
||||
ei.MyContent.Config = sc.ToString();
|
||||
ei.Save();
|
||||
enhii.RefreshConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (IsProcedure)
|
||||
@@ -1942,11 +1952,14 @@ namespace VEPROMS.CSLA.Library
|
||||
using (Item ii = this.Get())
|
||||
{
|
||||
ProcedureConfig sc = this.MyConfig as ProcedureConfig;
|
||||
sc.AddEnhancedDocument(enhtype, enhii.ItemID);
|
||||
sc.SaveEnhancedDocuments();
|
||||
ii.MyContent.Config = sc.ToString();
|
||||
ii.Save();
|
||||
RefreshConfig();
|
||||
if (!sc.MyEnhancedDocuments.Exists(x => x.Type == 0))
|
||||
{
|
||||
sc.AddEnhancedDocument(enhtype, enhii.ItemID);
|
||||
sc.SaveEnhancedDocuments();
|
||||
ii.MyContent.Config = sc.ToString();
|
||||
ii.Save();
|
||||
RefreshConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user