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);