B2021-044 – Added null reference check. When no procedures are open, user with view only security clicks on an Incoming Transition result. The code was trying to toggle the Find/Replace tooltip

This commit is contained in:
John Jenko 2021-04-13 13:53:31 +00:00
parent c88266ae58
commit 687e3b511d

View File

@ -3440,6 +3440,9 @@ 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
// 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;