B2022-146: Beaver Valley - Left justify Note and Caution text that has sub-steps

This commit is contained in:
Kathy Ruffing 2022-12-09 13:35:10 +00:00
parent e78eed4628
commit 6787219523
2 changed files with 11 additions and 1 deletions

View File

@ -5495,6 +5495,14 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _CenterOneLineOnly, "@CenterOneLineOnly");
}
}
private LazyLoad<bool> _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<bool> _AlwaysCenter;
public bool AlwaysCenter

View File

@ -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.