Added logic to support ColOverride on Caution and Note types in Enhanced Background Formats.
This commit is contained in:
parent
bd72c82eb4
commit
469a8da0ba
@ -4010,6 +4010,12 @@ namespace Volian.Print.Library
|
||||
get { return _XOffsetCenter; }
|
||||
set { _XOffsetCenter = value; }
|
||||
}
|
||||
|
||||
public bool IsEnhancedBackgroundFormat(ItemInfo itminfo)
|
||||
{
|
||||
return ((itminfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds);
|
||||
}
|
||||
|
||||
public void AdjustXOffsetForTab(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo, vlnTab myTab, float xMetaAdj)
|
||||
{
|
||||
float tabWidth = (myTab == null) ? 0 : myTab.Width;
|
||||
@ -4200,15 +4206,22 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (((colOvrd ?? 0) != 0) && formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.NullBox)
|
||||
else if (((colOvrd ?? 0) != 0) && (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.NullBox))
|
||||
{
|
||||
float tabOffset = (myTab == null ? 0 : myTab.XOffset) - XOffset;
|
||||
|
||||
XOffset = (float)colOvrd;
|
||||
if (myTab != null) myTab.XOffset = XOffset + tabOffset;
|
||||
return;
|
||||
}
|
||||
// put in for Point Beach (wep2) we don't want to do this if we are processing a boxed substep (cont. action substep)
|
||||
else if (((colOvrd ?? 0) != 0) && (IsEnhancedBackgroundFormat(itemInfo) && (itemInfo.IsNote || itemInfo.IsCaution)))
|
||||
{
|
||||
float tabOffset = (myTab == null ? 0 : myTab.XOffset);
|
||||
// Adjust the position of the Note/Caution text by the difference of the colOverride and the tab xoffset
|
||||
XOffset += ((float)colOvrd - tabOffset);
|
||||
if (myTab != null) myTab.XOffset = (float)colOvrd; // set the note/caution tab offset to the colOverride
|
||||
return;
|
||||
}
|
||||
// put in for Point Beach (wep2) we don't want to do this if we are processing a boxed substep (cont. action substep)
|
||||
else if (bxIndx != null && (itemInfo.IsCaution || itemInfo.IsNote ||
|
||||
!itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.ContActBoxOnSubSteps))
|
||||
{
|
||||
@ -4262,7 +4275,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
// if the tab is 3 char or smaller, make the indent amount for the rno text 4 characters.
|
||||
// if bigger, make it the additional tab size.
|
||||
int len = myTab.Text.Trim().Length;
|
||||
int len = myTab.Text.Trim().Length;
|
||||
int adj = len <= 3 ? 4 : (len - 3) + 4;
|
||||
float rnoOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)itemInfo.MyDocStyle.CenterLineX + 5;
|
||||
float tPtPerChar = itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TabPtsPerChar ?? 6;
|
||||
|
Loading…
x
Reference in New Issue
Block a user