Change ‘Count’ to ‘MaxIndex’ for ‘vlnIndexedFormatList’

This commit is contained in:
2015-07-20 14:33:06 +00:00
parent 6c6f895834
commit 3e403455ec
4 changed files with 11 additions and 11 deletions

View File

@@ -3906,7 +3906,7 @@ namespace Volian.Print.Library
// First see if there is any checkoff data in the format file and that there
// is a pagelist item for the checkoff header.
if (itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.Count <= 0) return;
if (itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex <= 0) return;
if (MyPageHelper.PageListCheckOffHeader == null) return;
VE_Font font = null;
@@ -4801,7 +4801,7 @@ namespace Volian.Print.Library
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
{
int indxLevel = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel();
float colsbylevel = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].ColSByLevel;
float colsbylevel = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].ColSByLevel;
float seclvlindent = colsbylevel - (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS;
float adjCols = (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS + seclvlindent;
float xtabcol = adjCols - ((myTab == null || myTab.Text == null) ? 0 : (myTab.Text.Length * 7.2f));
@@ -5260,8 +5260,8 @@ namespace Volian.Print.Library
&& !(itemInfo.MyDocStyle.SpecialStepsFoldout && itemInfo.MyDocStyle.UseColSByLevel))
{
int indxLevel = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel();
adjwidth += formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].WidSAdjByLevel ?? 0; ;
float colsbylevel = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].ColSByLevel;
adjwidth += formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].WidSAdjByLevel ?? 0; ;
float colsbylevel = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[indxLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].ColSByLevel;
float seclvlindent = colsbylevel - (float)formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColS;
adjwidth -= seclvlindent;
if (itemInfo.IsStep) adjwidth -= AdjustForSectionLevelTab();
@@ -5271,8 +5271,8 @@ namespace Volian.Print.Library
}
else
{
if (formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count > 0)
adjwidth += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[itemInfo.PrintLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.Count].ColSByLevel;
if (formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex > 0)
adjwidth += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[itemInfo.PrintLevel % formatInfo.PlantFormat.FormatData.SectData.MetaSectionList.MaxIndex].ColSByLevel;
}
}
return adjwidth;
@@ -5362,7 +5362,7 @@ namespace Volian.Print.Library
}
private bool HasCheckOffHeading(ItemInfo itemInfo, FormatInfo formatInfo)
{
if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList.Count != 0)
if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList.MaxIndex != 0)
{
// does this section have a check off heading?
SectionConfig sc = itemInfo.MyActiveSection.MyConfig as SectionConfig;