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

@@ -1495,7 +1495,7 @@ namespace Volian.Controls.Library
TransTypeList ttl = dvi.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
cbxTranFormat.Items.Clear();
cbxTranFormat.Items.Add("All");
for (int i = 0; i < ttl.Count; i++)
for (int i = 0; i < ttl.MaxIndex; i++)
cbxTranFormat.Items.Add(new TransItem(ttl[i].TransMenu.Replace("?.", ""), ttl[i].TransFormat.Replace("?.", "")));
cbxTranFormat.SelectedIndex = 0;
cbxTranCategory.Items.Clear();

View File

@@ -192,7 +192,7 @@ namespace Volian.Controls.Library
bool _checkoffsAllowed = true;
if (fmtdata.ProcData.CheckOffData.CheckoffOnSubStepsOnly)
_checkoffsAllowed = cmbCheckoff.Enabled = CurItemInfo.IsType("Substep");
if (_checkoffsAllowed && !(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0))
if (_checkoffsAllowed && !(fmtdata.ProcData.CheckOffData.CheckOffList == null) && !(fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndex == 0))
{
cmbCheckoff.Items.Clear();
foreach (CheckOff co in fmtdata.ProcData.CheckOffData.CheckOffList)
@@ -205,7 +205,7 @@ namespace Volian.Controls.Library
// if this is a sign-off, the checkoff list is not enabled either (matches 16bit functionality) At some point, we
// may want to allow them to turn off the checkoff
// Catawba and McGuire formats use this
if (_checkoffsAllowed && (fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0) ||
if (_checkoffsAllowed && (fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.MaxIndex == 0) ||
fmtdata.ProcData.CheckOffData.Menu == "Signoff")
{
SectionConfig secf = CurItemInfo.ActiveSection.MyConfig as SectionConfig;

View File

@@ -422,7 +422,7 @@ namespace Volian.Controls.Library
{
TransTypeList ttl = _CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList;
listBoxTranFmt.Items.Clear();
for (int i = 0; i < ttl.Count; i++)
for (int i = 0; i < ttl.MaxIndex; i++)
listBoxTranFmt.Items.Add(new TransItem(ttl[i].TransMenu.Replace("?.",""),ttl[i].TransFormat.Replace("?.","")));
//listBoxTranFmt.Items.Add(ttl[i].TransFormat.Replace("?.",""));
listBoxTranFmt.SelectedIndex = _TranFmtIndx;