From 7312330448227973ae0fa73ec61ba7cb52d50cd7 Mon Sep 17 00:00:00 2001 From: Kathy Ruffing Date: Thu, 24 Aug 2023 06:46:20 -0400 Subject: [PATCH] =?UTF-8?q?B2023-089:=20Search=20results=20=E2=80=93=20res?= =?UTF-8?q?election=20of=20search=20results=20step=20that=20was=20deleted?= =?UTF-8?q?=20causes=20unexpected=20results=20when=20redisplayed=20in=20ed?= =?UTF-8?q?itor.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/DisplaySearch.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index 5d360a15..9f0d5402 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -1833,7 +1833,10 @@ namespace Volian.Controls.Library if (_ItemInfo != null) { _OpenDocFromSearch = true; - DisplayTabItem dti = _TabControl.OpenItem(_ItemInfo); // open the corresponding procedure text + // B2023-089: selecting a deleted item from search results shows deleted step in the editor when the StepTabItem for + // the deleted item was displayed but is not the active StepTabItem. Use its procedure if it was deleted + ItemInfo openItem = _ItemInfo.IsDeleted ? ItemInfo.Get(_ItemInfo.MyProcedure == null ? _ItemInfo.ItemID : _ItemInfo.MyProcedure.ItemID) : _ItemInfo; + DisplayTabItem dti = _TabControl.OpenItem(openItem); // open the corresponding procedure text if (dti != null) { if (dti.MyDSOTabPanel != null)