From 216d7b5c3f29185ecebd348b30245fab92da8fb1 Mon Sep 17 00:00:00 2001 From: zivmaor Date: Sun, 6 Oct 2024 13:39:46 +0300 Subject: [PATCH] fix #1940 Fix DecompiledEditor and DisassemblyEditor erroneously reporting that they have changed when loading a child code entry, resulting in an error when trying to save. Also minor grammar fix. --- UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs b/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs index 472a3a76e..1946049c9 100644 --- a/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs +++ b/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs @@ -519,7 +519,8 @@ private void DisassembleCode(UndertaleCode code, bool first) if (code.ParentEntry != null) { DisassemblyEditor.IsReadOnly = true; - text = "; This code entry is a reference to an anonymous function within " + code.ParentEntry.Name.Content + ", view it there"; + text = "; This code entry is a reference to an anonymous function within " + code.ParentEntry.Name.Content + ", view it there."; + DisassemblyChanged = false; } else { @@ -645,7 +646,8 @@ private async Task DecompileCode(UndertaleCode code, bool first, LoaderDialog ex if (code.ParentEntry != null) { - DecompiledEditor.Text = "// This code entry is a reference to an anonymous function within " + code.ParentEntry.Name.Content + ", view it there"; + DecompiledEditor.Text = "// This code entry is a reference to an anonymous function within " + code.ParentEntry.Name.Content + ", view it there."; + DecompiledChanged = false; CurrentDecompiled = code; existingDialog?.TryClose(); }