B2019-119 We now check if a search for annotations was done prior to updating the search results list, after an annotation is deleted. Prior to this, PROMS would appear to hang or slow when an annotation was deleted AND there were no search results to update.
This commit is contained in:
parent
b0ba50e4f7
commit
b6f703f75f
@ -1058,6 +1058,7 @@ namespace Volian.Controls.Library
|
||||
//}
|
||||
public void UpdateAnnotationSearchResults()
|
||||
{
|
||||
if (!LastSearchWasAnnotations) return; // B2019-119 only refresh annotation search results if an annotation search was done
|
||||
// B2019-004: update search results list when an annotation is removed. (before bug fix, code method & code below was commented out)
|
||||
string unitPrefix = "";
|
||||
if (Mydocversion != null)
|
||||
@ -1312,6 +1313,13 @@ namespace Volian.Controls.Library
|
||||
return rtnstr;
|
||||
}
|
||||
|
||||
private bool _LastSearchWasAnnotations = false; // B2019-119 only refresh annotation search results if an annotation search was done
|
||||
public bool LastSearchWasAnnotations
|
||||
{
|
||||
get { return _LastSearchWasAnnotations; }
|
||||
set { _LastSearchWasAnnotations = value; }
|
||||
}
|
||||
|
||||
private void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
DateTime start = DateTime.Now;
|
||||
@ -1321,6 +1329,7 @@ namespace Volian.Controls.Library
|
||||
int cmbResultsStyleIndex = -1;
|
||||
try
|
||||
{
|
||||
LastSearchWasAnnotations = false; // B2019-119 only refresh annotation search results if an annotation search was done
|
||||
lbSrchResults.DataSource = null;
|
||||
lbSrchResults.Items.Clear();
|
||||
toolTip1.SetToolTip(lbSrchResults, null);
|
||||
@ -1385,6 +1394,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
else if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1]) // Annotation Search
|
||||
{
|
||||
LastSearchWasAnnotations = true; // B2019-119 only refresh annotation search results if an annotation search was done
|
||||
SearchString = null;
|
||||
//ReportTitle = string.Format("Proms - Annotation Search for '{0}'", cbxTextSearchAnnotation.Text);
|
||||
if (cbxTextSearchAnnotation.Text == null || cbxTextSearchAnnotation.Text == "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user