Step Level should include an extra count for AND and OR Step Types to reduce the likelyhood of pagination splitting an OR or an AND type step.
This commit is contained in:
parent
a95f7bb59a
commit
0091be08da
@ -800,8 +800,9 @@ namespace VEPROMS.CSLA.Library
|
||||
// formats that have it.
|
||||
if (item.IsExactType("And") || item.IsExactType("Or") || item.IsExactType("ImplicitOr"))
|
||||
level++;
|
||||
if (parent != null && (parent.IsExactType("And") || parent.IsExactType("Or")))
|
||||
level++;
|
||||
//if (item.ParentAndOr)
|
||||
// level++;
|
||||
level += item.ParentAndOrCount;
|
||||
|
||||
// First substep, this is where it uses the orphan logic from above.
|
||||
if (!item.IsRNOPart && !item.IsHigh && item.MyPrevious == null)
|
||||
@ -841,7 +842,26 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
return level;
|
||||
}
|
||||
|
||||
private bool ParentAndOr
|
||||
{
|
||||
get
|
||||
{
|
||||
ItemInfo parent = ActiveParent as ItemInfo;
|
||||
if (parent == null) return false;
|
||||
if (parent.IsExactType("And") || parent.IsExactType("Or")) return true;
|
||||
return parent.ParentAndOr;
|
||||
}
|
||||
}
|
||||
private int ParentAndOrCount
|
||||
{
|
||||
get
|
||||
{
|
||||
ItemInfo parent = ActiveParent as ItemInfo;
|
||||
if (parent == null) return 0;
|
||||
if (parent.IsExactType("And") || parent.IsExactType("Or")) return 1 + parent.ParentAndOrCount;
|
||||
return parent.ParentAndOrCount;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Count all levels, including substeps within RNOs. Ignore RNOs that are to the right of
|
||||
/// the AER, but count those that are below higher level RNOs.
|
||||
|
Loading…
x
Reference in New Issue
Block a user