From 26634f7efdb5201204c93ab07805dba3169ccdfb Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Fri, 20 Dec 2019 07:34:16 -0500 Subject: [PATCH] notify editor when content changes --- .../Editors/Binary/BinaryEditor.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Editors/Binary/BinaryEditor.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/Binary/BinaryEditor.cs index 208bea7c..89049057 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Editors/Binary/BinaryEditor.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Editors/Binary/BinaryEditor.cs @@ -126,6 +126,8 @@ namespace UniversalEditor.Editors.Binary this.hexedit = new HexEditorControl(); this.hexedit.SelectionChanged += Hexedit_SelectionChanged; + + this.hexedit.Changing += hexedit_Changing; this.hexedit.Changed += hexedit_Changed; this.conversionPanel = new Container(); @@ -629,9 +631,14 @@ namespace UniversalEditor.Editors.Binary } } - + private void hexedit_Changing(object sender, EventArgs e) + { + BeginEdit(); + } private void hexedit_Changed(object sender, EventArgs e) { + EndEdit(); + foreach (TreeModelRow row in tmFieldDefinitions.Rows) { FieldDefinition def = row.GetExtraData("def"); @@ -778,6 +785,7 @@ namespace UniversalEditor.Editors.Binary hexedit.Data = odata; } Array.Copy(data, 0, hexedit.Data, hexedit.SelectionStart.ByteIndex, data.Length); + Refresh(); } else