From 27703fe2c738b884d01843106e078729f2f66982 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 20 Dec 2013 20:08:30 +0000 Subject: [PATCH] code that adjusted the width of the Caution and Note in the RNO was re-added --- PROMS/Volian.Print.Library/vlnParagraph.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index ee2374d9..9289628a 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2959,8 +2959,22 @@ namespace Volian.Print.Library float mycolT = (float)formatInfo.MyStepSectionLayoutData.ColT; if (formatInfo.MyStepSectionLayoutData.Dev_Format) Width = (float)formatInfo.MyStepSectionLayoutData.WidT + 1; - else if (itemInfo.IsInRNO) - Width = (float)vlnPrintObject.ToInt(formatInfo.MyStepSectionLayoutData.WidSTablePrint, maxRNO)- tabWidth; + else if (itemInfo.IsInRNO && itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.AdjustRNOCautionNoteWidth) + { + float widadj = tabWidth; + ItemInfo pinfo = itemInfo.MyParent; + // walk up the parent nodes (but only in the RNO) and + // add the width of each tab (at each level) + // so that we can subtract it from the width of Note or Caution + // put in for Catawba and McGuire Notes/Cautions on RNO substeps + while (pinfo != null && pinfo.IsInRNO) + { + widadj += (float)(pinfo.MyTab.Text.Length * pinfo.MyTab.MyFont.CharsToTwips); + pinfo = pinfo.MyParent; + } + Width = (float)vlnPrintObject.ToInt(formatInfo.MyStepSectionLayoutData.WidSTablePrint, maxRNO) - widadj; + //Width = (float)vlnPrintObject.ToInt(formatInfo.MyStepSectionLayoutData.WidSTablePrint, maxRNO) - tabWidth; + } else Width = (float)formatInfo.MyStepSectionLayoutData.WidT - 6 - mycolT; XOffset += mycolT; // adjust caution/note text position