From faeb407c595869eec9f5abd52b6d8bb02b6975e2 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 16 Feb 2018 13:20:12 +0000 Subject: [PATCH] B2018-024: Pagination of Supplemental Information --- PROMS/Volian.Print.Library/Pagination.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index bf48e99f..e6cbc954 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -906,6 +906,7 @@ namespace Volian.Print.Library // to have page breaks. As each of these are processed (after this code) the topmost item in PageBreakOnStepList is removed. // The following checks if the entire step will fit for these types of steps and if so return the next break, i.e. [0], from the PageBreakOnStepList. // The if was changed to fix B2017-161. + bool DidPreferredPageBreak = false; if (PageBreakOnStepList.Count > 0 && (PageBreakOnStepList[0].YTop - (lastBreak == null ? ((TopMostChild != null) ? TopMostChild.YTop : 0) : lastBreak.YTop) <= ySpaceOnCurPage)) paraBreak = PageBreakOnStepList[0]; else @@ -921,6 +922,7 @@ namespace Volian.Print.Library if (lastBreak == null || lastBreak.MyItemInfo.ShortPath.CompareTo(prefBreak.MyItemInfo.ShortPath) == -1) paraBreak = prefBreak; myPreferredBreaks.RemoveAt(0); + DidPreferredPageBreak = true; } } // B2017-252 Pagination Fix - Break at title rather than title content @@ -1123,7 +1125,8 @@ namespace Volian.Print.Library // This fixes B2016-174: // Added the check to not go into this code if on a step that needs to break. If the conditions were met, this // code was not putting a page break on a step that needed to break, i.e. PageBreakOnStep = true. - if ((MyItemInfo.IsStep && !MyItemInfo.FormatStepData.PageBreakOnStep) && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PartialStepCompression && onNewPage) // ySpaceOnNextPage1 == ySpaceOnCurPage+myBottomMsgSpace) + // B2018-024: Added the 'DidPreferredPageBreak', don't do the compressed code if a preferred page break exists on the step. + if (!DidPreferredPageBreak && (MyItemInfo.IsStep && !MyItemInfo.FormatStepData.PageBreakOnStep) && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PartialStepCompression && onNewPage) // ySpaceOnNextPage1 == ySpaceOnCurPage+myBottomMsgSpace) { float ySpaceAt7LPI = ((ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter) * SixLinesPerInch / _SevenLinesPerInch) - _SevenLinesPerInch; vlnParagraph paraBreak7 = FindPageBreak(yStart, ySpaceAt7LPI, yLowerLimit,