From 5cd501c1222483a6a950aafa4a3b908362b8cd6e Mon Sep 17 00:00:00 2001 From: John Date: Tue, 30 Mar 2021 17:50:17 +0000 Subject: [PATCH] B2021-036 Canceling on a Forced Check-in of a Word section was setting the red text in the procedure tree (for that section) back to black. --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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))