From ffcdbb7267a474d641bdcd806c2992cf6532b4c6 Mon Sep 17 00:00:00 2001 From: VladiStep Date: Fri, 6 Jan 2023 16:23:10 +0300 Subject: [PATCH 1/2] Fixed #1147 --- UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs b/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs index fb16146fc..f1577d14c 100644 --- a/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs +++ b/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs @@ -231,7 +231,7 @@ private async void UserControl_DataContextChanged(object sender, DependencyPrope CurrentDecompiled is not null && CurrentDecompiled != code) { DecompiledSkipped = true; - DecompiledEditor_LostFocus(sender, null); + await DecompiledLostFocusBody(sender, null); } else if (DisassemblyTab.IsSelected && DisassemblyFocused && DisassemblyChanged && @@ -241,7 +241,7 @@ private async void UserControl_DataContextChanged(object sender, DependencyPrope DisassemblyEditor_LostFocus(sender, null); } - DecompiledEditor_LostFocus(sender, null); + await DecompiledLostFocusBody(sender, null); DisassemblyEditor_LostFocus(sender, null); if (MainWindow.CodeEditorDecompile != Unstated) //if opened from the code search results "link" From 63f76e16d0fd1f83c4b9b817f5d31ba2d43818fb Mon Sep 17 00:00:00 2001 From: VladiStep Date: Tue, 10 Jan 2023 16:09:56 +0300 Subject: [PATCH 2/2] Fixed #1149 --- UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs b/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs index f1577d14c..b8fbb4372 100644 --- a/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs +++ b/UndertaleModTool/Editors/UndertaleCodeEditor.xaml.cs @@ -244,6 +244,9 @@ private async void UserControl_DataContextChanged(object sender, DependencyPrope await DecompiledLostFocusBody(sender, null); DisassemblyEditor_LostFocus(sender, null); + DecompiledYet = false; + DisassembledYet = false; + if (MainWindow.CodeEditorDecompile != Unstated) //if opened from the code search results "link" { if (MainWindow.CodeEditorDecompile == DontDecompile && code != CurrentDisassembled)