From 98c04c8f0acce32d63a258f76def268cccfd2187 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 31 Oct 2018 14:39:32 +0000 Subject: [PATCH] B2018-139 added checks for HLS, Cautions, Notes when processing Background text so that the left margin will be used in positioning the tab and text --- PROMS/Volian.Print.Library/vlnParagraph.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 180163d8..6c82d6da 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -3354,7 +3354,8 @@ namespace Volian.Print.Library // if this is a Note or Caution off of a Note or Caution (Catawba EG/1A/CSAM/SACGR1 step 1) // then indent it the length of its tab if (itemInfo.IsCaution || itemInfo.IsNote) - XOffset += (itemInfo.FormatStepData.TabData.IdentPrint.Length - 1) * 6; + XOffset += (!itemInfo.IsBackgroundStep()) ? (itemInfo.FormatStepData.TabData.IdentPrint.Length - 1) * 6 : 0; // B2018-139 don't adjust XOffset when processing a Caution, or Note background text is is off of Caution or Note WCN BG SAG-10 step 4 + else if (itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset != null) XOffset = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.DevNoteOrCautionTabOffset); @@ -5679,9 +5680,15 @@ namespace Volian.Print.Library int adj = 2; if (myTab != null) { - // F2018-041 seq tabs off of TitleWithTextBelow were running into the step text - myTab.XOffset = XOffset + (itemInfo.FormatStepData.Font.CharsToTwips * adj); // F2018-041 move tab over 2 chars so it positions like paragraphs under TitleWithTextBelow - adj += myTab.Text.Length; // F2018-041 add the length of the tab to the adjustment of the XOffset + //B2018-139 use XOffset when processing HLS, Caution, or Note background text and tab + if (itemInfo.IsHigh || (itemInfo.IsNote && (itemInfo.MyParent.IsHigh || itemInfo.MyParent.IsCaution || itemInfo.MyParent.IsNote)) || (itemInfo.IsCaution && (itemInfo.MyParent.IsHigh || itemInfo.MyParent.IsCaution || itemInfo.MyParent.IsNote))) + myTab.XOffset = XOffset; + else + { + // F2018-041 seq tabs off of TitleWithTextBelow were running into the step text + myTab.XOffset = XOffset + (itemInfo.FormatStepData.Font.CharsToTwips * adj); // F2018-041 move tab over 2 chars so it positions like paragraphs under TitleWithTextBelow + adj += myTab.Text.Length; // F2018-041 add the length of the tab to the adjustment of the XOffset + } } XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * adj); // indent 2 characters for background steps Width -= (itemInfo.FormatStepData.Font.CharsToTwips * adj); // Adjust width by 2 characters