B2019-057 The override width on sub-steps without tabs (i.e. paragraph) was being reset back to non-override value. Added logic to not do this if the step type has a width override set in the format.

This commit is contained in:
John Jenko 2019-04-10 18:45:01 +00:00
parent 23d3774cdf
commit c8b01d803c

View File

@ -5801,8 +5801,10 @@ namespace Volian.Print.Library
XOffset = childindent + MyParent.XOffset + indentBG2;//(itemInfo.FormatStepData.Font.CharsToTwips * 2);
// B2016-164: Added the following 'if' so that the width is not recalculated if in the alarm format & the parent has a template
// B2016-168: The fix for 164 broke deviation document printing. The if statement was fixed for both:
if (!itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || !UseTemplateWidthOrXOff(itemInfo.MyParent))
Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin - indentBG2;
// B2019-057 Added a check to see if there is a width override for this step element (Robinson AOP Backgrounds - paragraphs)
float wdthovrd = (itemInfo.FormatStepData.WidthOverride == null) ? 0 : (float)ToInt(itemInfo.FormatStepData.WidthOverride, maxRNO);
if ((!itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || !UseTemplateWidthOrXOff(itemInfo.MyParent)) && wdthovrd == 0)
Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - (float)itemInfo.MyDocStyle.Layout.LeftMargin - indentBG2;
}
return;
}