B2019-004: An annotation is not removed from Annotation search results when it is deleted in the editor
This commit is contained in:
parent
8a96b47e72
commit
d7b97677d5
@ -279,14 +279,14 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
//using (Annotation annotation = CurrentAnnotation.Get())
|
||||
//{
|
||||
// annotation.Delete();
|
||||
_AnnotationSearch.LoadingList = true;
|
||||
Annotation.DeleteAnnotation(CurrentAnnotation);
|
||||
// annotation.Save();
|
||||
_AnnotationSearch.LoadingList = false;
|
||||
CurrentAnnotation = null;
|
||||
UpdateAnnotationGrid();
|
||||
//_AnnotationSearch.UpdateAnnotationSearchResults(); // update the search results
|
||||
// annotation.Delete();
|
||||
_AnnotationSearch.LoadingList = true;
|
||||
Annotation.DeleteAnnotation(CurrentAnnotation);
|
||||
// annotation.Save();
|
||||
_AnnotationSearch.LoadingList = false;
|
||||
CurrentAnnotation = null;
|
||||
UpdateAnnotationGrid();
|
||||
_AnnotationSearch.UpdateAnnotationSearchResults(); // B2019-004: update search results list when an annotation is removed.
|
||||
//}
|
||||
}
|
||||
|
||||
|
@ -1056,19 +1056,29 @@ namespace Volian.Controls.Library
|
||||
// }
|
||||
// Console.WriteLine("{0} Populate", DateTime.Now);
|
||||
//}
|
||||
//public void UpdateAnnotationSearchResults()
|
||||
//{
|
||||
// //AnnotationTypeInfo ati = cbxAnnoTypes.SelectedValue as AnnotationTypeInfo;
|
||||
// //_LoadingList = true;
|
||||
// //lbSrchResults.DataSource = ati.AnnotationTypeAnnotations;
|
||||
// //lbSrchResults.SelectedIndex = -1;
|
||||
// //LastResultsMouseOverIndex = -1;
|
||||
// //if (lbSrchResults.Items.Count > 0)
|
||||
// // btnPrnSrchRslts.Enabled = true;
|
||||
// //else
|
||||
// // btnPrnSrchRslts.Enabled = false;
|
||||
// //_LoadingList = false;
|
||||
//}
|
||||
public void UpdateAnnotationSearchResults()
|
||||
{
|
||||
// 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)
|
||||
unitPrefix = Mydocversion.DocVersionConfig.Unit_ProcedureNumber;
|
||||
if (unitPrefix.EndsWith("#"))
|
||||
unitPrefix = unitPrefix.Replace("#", "");
|
||||
SearchResults = ItemInfoList.GetListFromAnnotationSearch(DVISearchList, TypeSearchList, AnnotationSearchType, cbxTextSearchAnnotation.Text, cbxCaseSensitiveAnnoText.Checked, unitPrefix);
|
||||
DisplayResults();
|
||||
/*
|
||||
AnnotationTypeInfo ati = cbxAnnoTypes.SelectedValue as AnnotationTypeInfo;
|
||||
_LoadingList = true;
|
||||
lbSrchResults.DataSource = ati.AnnotationTypeAnnotations;
|
||||
lbSrchResults.SelectedIndex = -1;
|
||||
LastResultsMouseOverIndex = -1;
|
||||
if (lbSrchResults.Items.Count > 0)
|
||||
btnPrnSrchRslts.Enabled = true;
|
||||
else
|
||||
btnPrnSrchRslts.Enabled = false;
|
||||
_LoadingList = false;
|
||||
* */
|
||||
}
|
||||
private void lbSrchResults_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
int ResultsMouseOverIndex = lbSrchResults.IndexFromPoint(e.Location);
|
||||
|
Loading…
x
Reference in New Issue
Block a user