B2019-049 Added check for table in a Caution or Note to the TableLocation() logic

B2019-049 when printing a table that is inside a note or cation, use the single column setting of the TableCenterPos format value
This commit is contained in:
John Jenko 2019-04-02 15:45:33 +00:00
parent abb89cc757
commit a2b10e0844
2 changed files with 4 additions and 3 deletions

View File

@ -2185,7 +2185,8 @@ namespace Volian.Controls.Library
int center = aboveForLocation.ContentLeft + aboveForLocation.ContentWidth / 2;
int rightLimit = aboveForLocation.Right;
// Then should center on the wid Limit
if ((MyItemInfo.FormatStepData.Type.Contains("AER") == false && MyItemInfo.RNOLevel == 0) && !MyItemInfo.IsInSupInfo)
// B2019-049 added check for the table being in a Caution or Note
if ((MyItemInfo.FormatStepData.Type.Contains("AER") == false && MyItemInfo.RNOLevel == 0) && !MyItemInfo.IsInSupInfo && !MyItemInfo.IsInCautionOrNote)
{
// B2017-043 COLR is used as a Width
int colR = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColRTable, MyItemInfo.ColumnMode);

View File

@ -4970,8 +4970,8 @@ namespace Volian.Print.Library
bool ctrCalvertAlarmTbl = false;
if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
ctrCalvertAlarmTbl = MyItemInfo.IsWithInSingleColumnTemplate();
float TableCenterPos = float.Parse(formatInfo.MyStepSectionLayoutData.TableCenterPos.Split(",".ToCharArray())[itemInfo.ColumnMode]);
// B2019-049 added check for table being in a Caution or Note - if so, use the single column setting for the format variable TableCenterPos
float TableCenterPos = float.Parse(formatInfo.MyStepSectionLayoutData.TableCenterPos.Split(",".ToCharArray())[(itemInfo.IsInCautionOrNote)?0:itemInfo.ColumnMode]);
if (ctrCalvertAlarmTbl || formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
XOffset = leftMargin + (pageWidth - leftMargin - (scale * Width)) / 2;
else