From 47fc0c4fa8f50f8a62cec3257aac95bcc523bde8 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 5 Dec 2017 20:32:41 +0000 Subject: [PATCH] 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 --- PROMS/Volian.Print.Library/vlnParagraph.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index aa3eab62..2ea8887a 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1499,9 +1499,25 @@ namespace Volian.Print.Library } 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) { 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) { ProfileTimer.Pop(profileDepth);