flush the current data in the hexedit control before we save

This commit is contained in:
Michael Becker 2019-12-25 02:29:23 -05:00
parent d672782428
commit 107cde359c
No known key found for this signature in database
GPG Key ID: 506F54899E2BFED7

View File

@ -46,6 +46,17 @@ namespace UniversalEditor.Editors.Binary
throw new NotImplementedException();
}
protected override void OnObjectModelSaving(System.ComponentModel.CancelEventArgs e)
{
base.OnObjectModelSaving(e);
// flush the current data
BinaryObjectModel bom = (ObjectModel as BinaryObjectModel);
if (bom == null) return;
bom.Data = hexedit.Data;
}
private static EditorReference _er = null;
public override EditorReference MakeReference()
{