From 9f0d3f8bc3c780660a42d59063a7631570509c06 Mon Sep 17 00:00:00 2001 From: Maxi Jabase Date: Tue, 12 Oct 2021 12:44:00 -0300 Subject: [PATCH] reduced OB refresh to improve performance --- UI/Components/EditorElement/EditorElement.xaml.cs | 1 - UI/MainWindow/MainWindow.xaml.cs | 5 ----- UI/MainWindow/MainWindowCommands.cs | 1 - UI/MainWindow/MainWindowSPCompiler.cs | 2 -- 4 files changed, 9 deletions(-) diff --git a/UI/Components/EditorElement/EditorElement.xaml.cs b/UI/Components/EditorElement/EditorElement.xaml.cs index 1c74a3cf..ad111656 100644 --- a/UI/Components/EditorElement/EditorElement.xaml.cs +++ b/UI/Components/EditorElement/EditorElement.xaml.cs @@ -929,7 +929,6 @@ public void Save(bool force = false) { using var fs = new FileStream(_FullFilePath, FileMode.Create, FileAccess.Write, FileShare.None); editor.Save(fs); - Program.MainWindow.RefreshObjectBrowser(); } catch (Exception e) { diff --git a/UI/MainWindow/MainWindow.xaml.cs b/UI/MainWindow/MainWindow.xaml.cs index 8e03a95c..f0fa9371 100644 --- a/UI/MainWindow/MainWindow.xaml.cs +++ b/UI/MainWindow/MainWindow.xaml.cs @@ -363,11 +363,6 @@ public bool TryLoadSourceFile(string filePath, out EditorElement outEditor, bool BlendOverEffect.Begin(); } - if (!SearchMode) - { - RefreshObjectBrowser(); - } - return true; } diff --git a/UI/MainWindow/MainWindowCommands.cs b/UI/MainWindow/MainWindowCommands.cs index 75f017e7..23947b87 100644 --- a/UI/MainWindow/MainWindowCommands.cs +++ b/UI/MainWindow/MainWindowCommands.cs @@ -102,7 +102,6 @@ private void Command_New() File.Create(newFilePath).Close(); AddEditorElement(new FileInfo(newFilePath), $"New Plugin ({newFileNum}).sp", true, out _); - RefreshObjectBrowser(); } catch (Exception ex) { diff --git a/UI/MainWindow/MainWindowSPCompiler.cs b/UI/MainWindow/MainWindowSPCompiler.cs index d8b73303..9f34fc53 100644 --- a/UI/MainWindow/MainWindowSPCompiler.cs +++ b/UI/MainWindow/MainWindowSPCompiler.cs @@ -313,7 +313,6 @@ await this.ShowMessageAsync(Program.Translations.GetLanguage("SPCompNotStarted") } } - RefreshObjectBrowser(); await progressTask.CloseAsync(); } InCompiling = false; @@ -383,7 +382,6 @@ private void Copy_Plugins() { CompileOutputRow.Height = new GridLength(200.0); } - RefreshObjectBrowser(); }); } }