B2017-266 For Farley, if the section has both an editable steps section and a sub-section, reset the End Message so that it prints on the last page of the section
This commit is contained in:
parent
d502f4b120
commit
47fc0c4fa8
@ -1499,9 +1499,25 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
set { _Height = value; }
|
set { _Height = value; }
|
||||||
}
|
}
|
||||||
|
// Check if the parent section has both an editable steps section and a sub-section
|
||||||
|
private bool ParentHasSectionAndSteps()
|
||||||
|
{
|
||||||
|
if (!MyItemInfo.ActiveParent.IsSection) return false;
|
||||||
|
SectionInfo parent = MyItemInfo.ActiveParent as SectionInfo;
|
||||||
|
bool hasSteps = false;
|
||||||
|
bool hasSections = false;
|
||||||
|
foreach(PartInfo pi in parent.MyContent.ContentParts)
|
||||||
|
{
|
||||||
|
if (pi.FromType == (int)E_FromType.Step && parent.SectionConfig.SubSection_Edit == "Y") hasSteps = true;
|
||||||
|
if (pi.FromType == (int)E_FromType.Section) hasSections = true;
|
||||||
|
}
|
||||||
|
return hasSteps && hasSections;
|
||||||
|
}
|
||||||
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
||||||
{
|
{
|
||||||
int profileDepth = ProfileTimer.Push(">>>> vlnParagraph.ToPdf");
|
int profileDepth = ProfileTimer.Push(">>>> vlnParagraph.ToPdf");
|
||||||
|
if (MyItemInfo.ActiveFormat.Name.ToUpper().StartsWith("FNP") && MyItemInfo.IsSection && ParentHasSectionAndSteps())
|
||||||
|
MyPageHelper.BottomMessage.Clear(); // B2017-266 reset the END message on the sub-section
|
||||||
if (MyItemInfo.IsFootnote && Processed)
|
if (MyItemInfo.IsFootnote && Processed)
|
||||||
{
|
{
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user