B2017-192: SAMG Supplemental facing page, incorrect steps on facing pages depending on page breaks of steps.

This commit is contained in:
2017-09-01 15:45:27 +00:00
parent 34ea55a624
commit a74b016fc5
3 changed files with 26 additions and 8 deletions

View File

@@ -2265,6 +2265,7 @@ namespace Volian.Print.Library
// see if any substeps of this item have supinfo, and if so, return the substep's id
int id = GetSubThatHasSupInfoItems(ii, startid);
if (id == -2) return -1;
if (id != -1) return id;
// Now go to the next item, check if it or any of its substeps have supinfo, and if so, return the id
@@ -2277,6 +2278,7 @@ namespace Volian.Print.Library
{
if (ii.MyParent.SupInfos != null && ii.MyParent.SupInfos.Count > 0) return ii.MyParent.SupInfos[0].ItemID;
int sbfromNC = GetSubThatHasSupInfoItems(ii.MyParent, startid);
if (sbfromNC == -2) return -1;
if (sbfromNC != -1) return sbfromNC;
}
@@ -2330,6 +2332,7 @@ namespace Volian.Print.Library
return ii.SupInfos[0].ItemID;
}
id = GetSubThatHasSupInfoItems(ii, startid);
if (id == -2) return -1;
if (id != -1) return id;
ii = ii.NextItem;
}
@@ -2339,6 +2342,8 @@ namespace Volian.Print.Library
{
if (ii.MyContent.ContentParts != null)
{
SectionInfo supInfoSect = ii.ActiveSection as SectionInfo;
if (supInfoSect == null) supInfoSect = SectionInfo.Get(ii.ActiveSection.ItemID);
foreach (PartInfo pi in ii.MyContent.ContentParts)
{
if ((E_FromType)pi.FromType != E_FromType.SupInfo)
@@ -2346,7 +2351,9 @@ namespace Volian.Print.Library
foreach (ItemInfo iic in pi.MyItems)
{
if (iic.SupInfos != null && iic.SupInfos.Count > 0) return iic.SupInfos[0].ItemID;
if (supInfoSect.StepSectPageBreaks.Contains(iic.ItemID)) return -2; // B2017-192: -2 flags that a page break within substep was found, return
int id = GetSubThatHasSupInfoItems(iic, startid);
if (id == -2) return -1;
if (id != -1) return id;
}
}