From 678721952394d7bbd799320075fda9a3727f058e Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 9 Dec 2022 13:35:10 +0000 Subject: [PATCH] B2022-146: Beaver Valley - Left justify Note and Caution text that has sub-steps --- PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs | 8 ++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index aee3bc92..f3e055bd 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -5495,6 +5495,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _CenterOneLineOnly, "@CenterOneLineOnly"); } } + private LazyLoad _CenterOnlyIfNoSubs; + public bool CenterOnlyIfNoSubs + { + get + { + return LazyLoad(ref _CenterOnlyIfNoSubs, "@CenterOnlyIfNoSubs"); + } + } // F2021-042: Added FormatStepData.AlwaysCenter for BNPP1 - Critical Step text always must be centered private LazyLoad _AlwaysCenter; public bool AlwaysCenter diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 02bff24f..74335284 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1057,7 +1057,9 @@ namespace Volian.Print.Library // multiplier accounts for both. // B2021-091 added a null reference check - MyItemInfo was a section and didn't have FormatStepData // F2021-042: Added FormatStepData.AlwaysCenter for BNPP1 - Critical Step text always must be centered - if (!MyItemInfo.IsStepSection && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.CenterOneLineOnly && ((MyItemInfo.MyPrevious == null && MyItemInfo.NextItem == null) + // B2022-146: Left Justify Note & Caution text that has sub-steps (for Beaver Valley) + bool cnWithChildren = !MyItemInfo.IsStepSection && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.CenterOnlyIfNoSubs && MyItemInfo.HasChildren; + if (!MyItemInfo.IsStepSection && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.CenterOneLineOnly && !cnWithChildren && ((MyItemInfo.MyPrevious == null && MyItemInfo.NextItem == null) || MyItemInfo.FormatStepData.SeparateBox || doAlign || MyItemInfo.FormatStepData.AlwaysCenter) && Height < (1.2F * IParagraph.Leading)) IParagraph.Alignment = Element.ALIGN_CENTER; // if this step is centered, but not part of the checklist or valvelist format, use itextsharp to center it.