diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index fd59441b..62443b98 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -1320,16 +1320,21 @@ namespace Volian.Controls.Library if (_lastRoFstId == rofstId) return; lblSrchRoMsg.Refresh(); - _lastRoFstId = rofstId; // C2019-041: Save this rofstid in case a new one is processed. cmboTreeROs.Nodes.Clear(); this.cmboTreeROs.AdvTree.BeforeExpand += new DevComponents.AdvTree.AdvTreeNodeCancelEventHandler(this.cmboTreeROs_BeforeExpand); cmboTreeROs.AdvTree.AfterExpand += new AdvTreeNodeEventHandler(AdvTree_AfterExpandorCollapse); cmboTreeROs.AdvTree.AfterCollapse += new AdvTreeNodeEventHandler(AdvTree_AfterExpandorCollapse); // populate the tree - only 1 folder/docversion is selected or all selected use the same rofst: - if (lstCheckedDocVersions != null && lstCheckedDocVersions.Count > 0) + // B2022-071 use the dvilTmp instead of lstCheckedDocVersions because if none are check then it's count will be zero + if (dvilTmp != null && dvilTmp.Count > 0) { - _MyDocVersion = lstCheckedDocVersions[0]; + // C2019-041: Save this rofstid in case a new one is processed. + // B2022-071: We were setting _lastRoFstId before checking if we were going to load the RO tree, + // So now set set it only if we actually load the RO tree + // Also, set _MydocVersion to dvilTmp[0] + _lastRoFstId = rofstId; + _MyDocVersion = dvilTmp[0]; if (_MyDocVersion.DocVersionAssociations != null && _MyDocVersion.DocVersionAssociations.Count > 0) {