diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index dd663834..d1310471 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -858,8 +858,11 @@ namespace VEPROMS { foreach (TreeNode tn in args.Node.Nodes) { + // B2021-036 Added a check if node is section when processing this first foreach loop. + // The set the tree node to red text if the procedure or the section in the respected dictionary ProcedureInfo pi = (tn as VETreeNode).VEObject as ProcedureInfo; - if (pi != null && dicProcCheckedOut.ContainsKey(pi.ItemID)) + SectionInfo si = (tn as VETreeNode).VEObject as SectionInfo; + if ((pi != null && dicProcCheckedOut.ContainsKey(pi.ItemID)) || (si != null && !si.IsStepSection && dicDocCheckedOut.ContainsKey(si.MyContent.MyEntry.DocID))) tn.ForeColor = Color.Red; else tn.ForeColor = Color.Black; @@ -868,7 +871,7 @@ namespace VEPROMS tn.Expand(); foreach (TreeNode tnn in tn.Nodes) { - SectionInfo si = (tnn as VETreeNode).VEObject as SectionInfo; + si = (tnn as VETreeNode).VEObject as SectionInfo; if (si != null && si.MyContent.MyEntry != null) { if (dicDocCheckedOut.ContainsKey(si.MyContent.MyEntry.DocID))