diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 1f264d29..f9c0bb66 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -963,7 +963,7 @@ namespace VEPROMS { toolsPanel.Expanded = true; toolsTabs.SelectedTab = toolsTabBookMarks; - if (_CurrentItem != null) displayBookMarks.AddBookMark(_CurrentItem); + if (_CurrentItem != null && !dlgFindReplace.Visible) displayBookMarks.AddBookMark(_CurrentItem); } else if (args.PanelTabName == "Global Search") { diff --git a/PROMS/Volian.Controls.Library/FindReplace.cs b/PROMS/Volian.Controls.Library/FindReplace.cs index 6f6c6f01..bb036713 100644 --- a/PROMS/Volian.Controls.Library/FindReplace.cs +++ b/PROMS/Volian.Controls.Library/FindReplace.cs @@ -163,9 +163,9 @@ namespace Volian.Controls.Library { ItemInfo next = (cbxReverse.Checked) ? MyEditItem.MyItemInfo.SearchPrev : MyEditItem.MyItemInfo.SearchNext; - while (!next.IsSection && !next.MyContent.Text.ToUpper().Contains(cmboFindText.Text.ToUpper())) + while ((next != null) && !next.IsSection && !next.MyContent.Text.ToUpper().Contains(cmboFindText.Text.ToUpper())) next = (cbxReverse.Checked) ? next.SearchPrev : next.SearchNext; - if (next.IsSection) + if ((next == null) || next.IsSection) { if (!findingbookmarks) {