B2019-029: When a new annotation is created, unless you press the save button, it is not saved

This commit is contained in:
2019-03-18 14:48:43 +00:00
parent c16ebcf2ed
commit 60d7ba4e88
3 changed files with 65 additions and 52 deletions

View File

@@ -318,7 +318,18 @@ namespace Volian.Controls.Library
if (!_LoadingAnnotation)
AnnotationDirty = true;
}
// B2019-029: Ask user if they want to save an annotation, if it was added (new) and the user did not click to save and moved to a
// new step
private void rtxbComment_Leave(object sender, EventArgs e)
{
if (this.AnnotationDirty && (Annotations == null || Annotations.Count == 0))
{
if (FlexibleMessageBox.Show(this, "Do you want to save the annotation?", "Confirm Annotation Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
SaveAnnotation();
}
}
}
#endregion
#region LoadControlData