From 8c727377f368f602253cfa6739cbd77f8fd6a5d0 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 3 Sep 2014 12:21:26 +0000 Subject: [PATCH] =?UTF-8?q?Template=20use:=20if=20xoffset=20from=20templat?= =?UTF-8?q?e=20is=200,=20don=E2=80=99t=20use=20it=20and=20use=20width=20fo?= =?UTF-8?q?r=20wolf=20creek=20checklists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Print.Library/vlnParagraph.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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();