From def8b2902a57c0495ca76275d82865e86c4efdff Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 6 Jul 2016 11:55:52 +0000 Subject: [PATCH] B2016-158: spell check of subsection whose section has non-editable data was causing infinite loop. --- .../Extension/ItemInfoSearchExt.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInfoSearchExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInfoSearchExt.cs index fbc07298..4f7a7ea3 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInfoSearchExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInfoSearchExt.cs @@ -22,7 +22,16 @@ namespace VEPROMS.CSLA.Library 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.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; return UpOneNext; }