From a8b50ef9299744d27bef67d512e34b78aabf6987 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 18 Feb 2015 18:13:11 +0000 Subject: [PATCH] Only account for the Section Number and Title if they are printed Print the top continue message if the Section Continue is not printed --- PROMS/Volian.Print.Library/Pagination.cs | 25 ++++++++++++++++------ PROMS/Volian.Print.Library/vlnParagraph.cs | 4 ++-- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 6efbc9f1..51f91c26 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -289,12 +289,15 @@ namespace Volian.Print.Library float sectionSpace = 0; if (doSectionTitleContinued) { - sectionSpace = 3 * SixLinesPerInch;// this should actuall use the physical size of the continue messsage. - // Fixing this caused problems with pagination ex Calvert Unit 2 IO-1l section 6.1.B step 2 - //if (MyItemInfo.ActiveSection.DisplayText.Length < 40) sectionSpace = SixLinesPerInch; - yPageSizeNextPage -= sectionSpace; - yExtra -= sectionSpace; - //yExtra2 -= sectionSpace; // This was removed for Calvert STP O-73H-2 Section 6.3.O.4 and 6.3.R.3 + if (SectionShowTitles) + { + sectionSpace = 3 * SixLinesPerInch;// this should actuall use the physical size of the continue messsage. + // Fixing this caused problems with pagination ex Calvert Unit 2 IO-1l section 6.1.B step 2 + //if (MyItemInfo.ActiveSection.DisplayText.Length < 40) sectionSpace = SixLinesPerInch; + yPageSizeNextPage -= sectionSpace; + yExtra -= sectionSpace; + //yExtra2 -= sectionSpace; // This was removed for Calvert STP O-73H-2 Section 6.3.O.4 and 6.3.R.3 + } } if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && yPageSizeNextPage < yWithinMargins + 108 && MyItemInfo.MyPrevious == null) KeepStepsOnPage = true; @@ -391,6 +394,16 @@ namespace Volian.Print.Library //return 2; throw new Exception("PageBreak Logic Missing, vlnParagraph.cs"); } + private bool SectionShowTitles + { + get + { + vlnParagraph parent = MyParent; + while (!parent.MyItemInfo.IsSection) + parent = parent.MyParent; + return parent.ShowSectionTitles; + } + } private bool SpecialCaseForRobinson() { if (MyItemInfo.ActiveFormat.Name.StartsWith("CPL") && diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 8c17324d..6beea9d3 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1227,7 +1227,7 @@ namespace Volian.Print.Library yPageStart = yTopMargin + YTopMost; DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart); - if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle , null); + if (doSectionContinue ) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle , null); // If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || MyItemInfo.IsSeparateSubsection)) { @@ -1344,7 +1344,7 @@ namespace Volian.Print.Library doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle; } } - if (!doSectionTitleContinued) + if (!doSectionTitleContinued || !SectionShowTitles) addExtraLines = DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, doThreeContinues && MyItemInfo.MyParent != null && MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.CleanText : null); MyPageHelper.YMultiplier = 1;