F2018-041 updated logic to handle the positioning of a sequential substep that is a child of a Title With Text Below step (i.e. Basis title in enhanced backgrounds) – for Wolf Creek Enhanced Documents

This commit is contained in:
John Jenko 2018-09-12 15:33:37 +00:00
parent f95ac3dbdd
commit 6a660a8c67

View File

@ -5668,9 +5668,15 @@ namespace Volian.Print.Library
float? colOvrd = itemInfo.FormatStepData.ColOverride; float? colOvrd = itemInfo.FormatStepData.ColOverride;
if (itemInfo.IsBackgroundStep()) if (itemInfo.IsBackgroundStep())
{ {
if (myTab != null) myTab.XOffset = XOffset; int adj = 2;
XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * 2); // indent 2 characters for background steps if (myTab != null)
Width -= (itemInfo.FormatStepData.Font.CharsToTwips * 2); // Adjust width by 2 characters {
// F2018-041 seq tabs off of TitleWithTextBelow were running into the step text
myTab.XOffset = XOffset + (itemInfo.FormatStepData.Font.CharsToTwips * adj); // F2018-041 move tab over 2 chars so it positions like paragraphs under TitleWithTextBelow
adj += myTab.Text.Length; // F2018-041 add the length of the tab to the adjustment of the XOffset
}
XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * adj); // indent 2 characters for background steps
Width -= (itemInfo.FormatStepData.Font.CharsToTwips * adj); // Adjust width by 2 characters
return; return;
} }
else if (itemInfo.FormatStepData.UseOldTemplate && itemInfo.IsInTemplate() && else if (itemInfo.FormatStepData.UseOldTemplate && itemInfo.IsInTemplate() &&