B2016-158: spell check of subsection whose section has non-editable data was causing infinite loop.

This commit is contained in:
Kathy Ruffing 2016-07-06 11:55:52 +00:00
parent 12a3b053ac
commit def8b2902a

View File

@ -22,7 +22,16 @@ namespace VEPROMS.CSLA.Library
if (skip < SkipPartType.Table && Tables != null && Tables.Count > 0) return Tables[0].SearchTop; if (skip < SkipPartType.Table && Tables != null && Tables.Count > 0) return Tables[0].SearchTop;
if (skip < SkipPartType.Procedures && Procedures != null && Procedures.Count > 0) return Procedures[0].SearchTop; if (skip < SkipPartType.Procedures && Procedures != null && Procedures.Count > 0) return Procedures[0].SearchTop;
if (skip < SkipPartType.Sections && Sections != null && Sections.Count > 0) return Sections[0].SearchTop; if (skip < SkipPartType.Sections && Sections != null && Sections.Count > 0) return Sections[0].SearchTop;
if (skip < SkipPartType.Steps && Steps != null && Steps.Count > 0) return Steps[0].SearchTop; // fix B2016-158: Don't process steps if this sectin is 'not-editable' (steps may exist but are hidden
// from edit & print)
bool iseditable = true;
if (IsSection)
{
SectionConfig sc = MyConfig as SectionConfig;
if (sc != null && sc.SubSection_Edit != "Y") iseditable = false;
}
if (iseditable && skip < SkipPartType.Steps && Steps != null && Steps.Count > 0) return Steps[0].SearchTop;
if (NextItem != null) return NextItem.SearchTop; if (NextItem != null) return NextItem.SearchTop;
return UpOneNext; return UpOneNext;
} }