B2024-068_069_check_if_current_annotation_is_not_selected_before_removal_of_annotation #407

Merged
jjenko merged 1 commits from B2024-068_and_069 into Development 2024-09-11 15:40:26 -04:00

View File

@ -276,6 +276,9 @@ namespace Volian.Controls.Library
} }
private void btnRemoveAnnotation_Click(object sender, EventArgs e) private void btnRemoveAnnotation_Click(object sender, EventArgs e)
{
// CSM B2024-068 / B2024-069 - check if current annotation is not selected before removal of annotation
if (CurrentAnnotation != null)
{ {
//using (Annotation annotation = CurrentAnnotation.Get()) //using (Annotation annotation = CurrentAnnotation.Get())
//{ //{
@ -289,6 +292,13 @@ namespace Volian.Controls.Library
_AnnotationSearch.UpdateAnnotationSearchResults(); // B2019-004: update search results list when an annotation is removed. _AnnotationSearch.UpdateAnnotationSearchResults(); // B2019-004: update search results list when an annotation is removed.
//} //}
} }
else
{
FlexibleMessageBox.Show("You Must Select an Annotation To Remove", "Annotation Not Selected", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
}
private void btnSaveAnnotation_Click(object sender, EventArgs e) private void btnSaveAnnotation_Click(object sender, EventArgs e)
{ {