From 7ab18b30d150b1041e6aefdbbf2e87af0953c06d Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 31 May 2018 13:48:31 +0000 Subject: [PATCH] B2018-047: crash after paste replace on newly created section within newly created procedure --- PROMS/Volian.Controls.Library/vlnTreeView.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 5d894385..fef188c4 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -2178,7 +2178,8 @@ namespace Volian.Controls.Library ItemInfo newEnhStep = replItemInfo.PasteEnhancedItems(copyStartID, ii, ItemInfo.EAddpingPart.Replace, chgId); } } - SelectedNode = (VETreeNode)((prevtn != null) ? prevtn.NextNode : partn.FirstNode); + // B2018-047: was crashing on the following line (before change it was casting the result to a VETreeNote when the partn.FirstNode was just a TreeNode) + SelectedNode = prevtn != null ? prevtn.NextNode : partn.FirstNode; } private void tv_NodeCopy() {