Added logic to keep an index from being negative.

This commit is contained in:
Rich 2013-12-19 22:28:28 +00:00
parent a134f68584
commit 8f6fae12af

View File

@ -520,7 +520,6 @@ namespace VEPROMS.CSLA.Library
if (_PrintLevel != 0) return _PrintLevel;
int _PrintBias = 0;
_PrintLevel = GetStepLevel(); //ref _PrintBias);
return _PrintLevel;
}
set { _PrintLevel = value; }
@ -2875,7 +2874,7 @@ namespace VEPROMS.CSLA.Library
level++;
if ((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SkipTwoStepLevels) == E_DocStructStyle.DSS_SkipTwoStepLevels && level == 0)
level += 2;
if (level < 0) level = 0;
return level;
}
public int CurrentSectionLevel()