notify we have edited the text, but only if the editor control has been created

This commit is contained in:
Michael Becker 2019-12-24 01:21:53 -05:00
parent 0868648961
commit e989cbd881
No known key found for this signature in database
GPG Key ID: 506F54899E2BFED7

View File

@ -68,6 +68,11 @@ namespace UniversalEditor.Editors.Text.Plain
private void txt_Changed(object sender, EventArgs e)
{
PlainTextObjectModel om = (this.ObjectModel as PlainTextObjectModel);
if (om == null)
return;
if (!IsCreated)
return;
if (!working)
{
@ -75,9 +80,11 @@ namespace UniversalEditor.Editors.Text.Plain
{
BeginEdit();
}
om.Text = txt.Text;
txt.ResetChangedByUser();
OnDocumentEdited(EventArgs.Empty);
}
}