diff --git a/PCK-Studio/Controls/Editor/EditorControl.cs b/PCK-Studio/Controls/Editor/EditorControl.cs index fffacd64..5df0a205 100644 --- a/PCK-Studio/Controls/Editor/EditorControl.cs +++ b/PCK-Studio/Controls/Editor/EditorControl.cs @@ -41,15 +41,16 @@ namespace PckStudio.Controls public void SetSaveContext(ISaveContext saveContext) => SaveContext = saveContext; - protected virtual void PreSave() - { } + protected virtual bool PreSave() + { return true; } protected virtual void PostSave() { } public void Save() { - PreSave(); + if (!PreSave()) + return; SaveContext.Save(EditorValue); PostSave(); } diff --git a/PCK-Studio/Controls/Editor/PckEditor.cs b/PCK-Studio/Controls/Editor/PckEditor.cs index e7b5ba15..c9447829 100644 --- a/PCK-Studio/Controls/Editor/PckEditor.cs +++ b/PCK-Studio/Controls/Editor/PckEditor.cs @@ -185,9 +185,11 @@ namespace PckStudio.Controls ); } - protected override void PreSave() + protected override bool PreSave() { EditorValue.Endianness = BigEndianCheckBox.Checked ? OMI.ByteOrder.BigEndian : OMI.ByteOrder.LittleEndian; + + return true; } protected override void PostSave()