diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 70a05e62..f28e0674 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2047,7 +2047,11 @@ namespace Volian.Print.Library Width = MyHighLevelParagraph.MyTab.Width + MyHighLevelParagraph.Width - 6; // make width 1/2 char smaller so it doesn't touch line } } - if (UseTemplateWidthOrXOff(itemInfo)) XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + GetWidthOrStartFromTemplate(itemInfo, itemInfo.ActiveFormat, false); + if (UseTemplateWidthOrXOff(itemInfo)) + { + float txoff = GetWidthOrStartFromTemplate(itemInfo, itemInfo.ActiveFormat, false); + if (txoff > 0) XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + txoff; // GetWidthOrStartFromTemplate(itemInfo, itemInfo.ActiveFormat, false); + } if (itemInfo.MyHeader != null && itemInfo.MyHeader.Text != null && !doSectTab) yoff += SetHeader(this, cb, itemInfo, formatInfo); else if(itemInfo.FormatStepData != null && itemInfo.FormatStepData.SeparateBox && itemInfo.FirstSibling.MyHeader != null && itemInfo.FirstSibling.MyHeader.Text != null) @@ -2342,7 +2346,7 @@ namespace Volian.Print.Library // Need the following with some modifications for WCNCKL format: if (Rtf.Contains("{Backspace}")) { - XOffset -= (formatInfo.PlantFormat.FormatData.PrintData.BackSpaceSize??25); + XOffset -= 25; Width += 24; Rtf = Rtf.Replace("{Backspace}", ""); } @@ -3963,9 +3967,7 @@ namespace Volian.Print.Library { if (!itemInfo.IsStep) return false; if (itemInfo.MyHLS == null) return false; - if (itemInfo.MyHLS.FormatStepData.UseSmartTemplate) return false; - if (!itemInfo.MyDocStyle.ComponentList) return false; - if (itemInfo.MyHLS.FormatStepData.UseOldTemplate) + if (itemInfo.MyHLS.FormatStepData.UseSmartTemplate || (itemInfo.MyDocStyle.ComponentList && itemInfo.MyHLS.FormatStepData.UseOldTemplate)) { ItemInfo useForTemplate = itemInfo.IsHigh ? itemInfo : itemInfo.MyParent; int topIndx = useForTemplate.GetSmartTemplateTopLevelIndx();