diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 6687f6e4..53f30637 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -521,14 +521,14 @@ namespace Volian.Print.Library private SectionInfo GetNextSection(SectionInfo currentSection) { if (currentSection.Sections != null) - return currentSection.Sections[0] as SectionInfo; + return currentSection.Sections[0].GetSectionInfo(); if (currentSection.NextItem != null) - return currentSection.NextItem as SectionInfo; - SectionInfo parent = currentSection.ActiveParent as SectionInfo; + return currentSection.NextItem.GetSectionInfo(); + ItemInfo parent = currentSection.ActiveParent as ItemInfo; while (parent != null && parent.NextItem == null) - parent = parent.ActiveParent as SectionInfo; + parent = parent.ActiveParent as ItemInfo; if (parent == null) return null; - return parent.NextItem as SectionInfo; + return parent.NextItem.GetSectionInfo(); } private SectionInfo _PreviousWordSection = null; public SectionInfo PreviousWordSection