From 41aac0b0634bb7aa60d3f28528b29092eeaf2431 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 14 May 2020 16:17:52 +0000 Subject: [PATCH] B2020-071 Added Null reference check logic for when a procedure set does not have a RO folder associated to it. --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 4d2bb708..986c3b02 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1033,13 +1033,20 @@ namespace VEPROMS if (myDTI.MyDSOTabPanel != null) { DSOTabPanel myDTP = myDTI.MyDSOTabPanel; - SelectedROFst = myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst; - if (_LastROFSTID != SelectedROFst.ROFstID) // B2017-240 Only refresh when the ROFSTID is different + if (myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations == null) { - _LastROFSTID = SelectedROFst.ROFstID; - displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226) - displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI); - displayRO.RefreshRoTree(); + SelectedROFst = null; // B2020-071 ROs are not associated with this procedure set. Set value to null so that PROMS does not try to generate the RO tree in Step Properties. + } + else + { + SelectedROFst = myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst; + if (_LastROFSTID != SelectedROFst.ROFstID) // B2017-240 Only refresh when the ROFSTID is different + { + _LastROFSTID = SelectedROFst.ROFstID; + displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226) + displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI); + displayRO.RefreshRoTree(); + } } } else if (tc.MyEditItem != null && displayRO.MyROFST != null && tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].ROFstID != displayRO.MyROFST.ROFstID)