From 687e3b511d75fa3ca8b2cbcb1aee1d1623b9e8fe Mon Sep 17 00:00:00 2001 From: John Date: Tue, 13 Apr 2021 13:53:31 +0000 Subject: [PATCH] =?UTF-8?q?B2021-044=20=E2=80=93=20Added=20null=20referenc?= =?UTF-8?q?e=20check.=20When=20no=20procedures=20are=20open,=20user=20with?= =?UTF-8?q?=20view=20only=20security=20clicks=20on=20an=20Incoming=20Trans?= =?UTF-8?q?ition=20result.=20=20The=20code=20was=20trying=20to=20toggle=20?= =?UTF-8?q?the=20Find/Replace=20tooltip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index de007911..1b5b6d7e 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -3440,7 +3440,10 @@ namespace VEPROMS this.dlgFindReplace.ToggleReplaceTab(args.ViewMode); // C2021-021 change the tool tip for the Find and Find/Replace button based on the user's accessibility to the procedure. // also change the text on the buttons to read either Find or Find/Replace - tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.ToggleFindReplaceToolTip(args.ViewMode == E_ViewMode.View); + // B2021-044 Added a null reference check. Happend when nothing is opened but a search for Incoming Transitions was done + // and you clicked on a found reference from the Search panel (the user had to have ViewOnly security setting) + if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyStepTabPanel != null && tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepTabRibbon != null) + tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.ToggleFindReplaceToolTip(args.ViewMode == E_ViewMode.View); } private ItemInfo _CurrentItem = null; private StepRTB _LastStepRTB = null;