Template use: if xoffset from template is 0, don’t use it and use width for wolf creek checklists

This commit is contained in:
Kathy Ruffing 2014-09-03 12:21:26 +00:00
parent 21353ceb82
commit 8c727377f3

View File

@ -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();