private void CompactRemoveEmptySequences(CompactFlags flags)
{
if ((flags & CompactFlags.RemoveEmptySequences) == CompactFlags.RemoveEmptySequences)
{
// Search for child sequence items
for (int i = Children.Count - 1; i >= 0; i--)
{
// If a sequence and that sequence does not have any children
KryptonWorkspaceSequence sequence = Children[i] as KryptonWorkspaceSequence;
if ((sequence != null) && (sequence.Children.Count == 0))
Children.RemoveAt(i);
}
}
}