From 173f1921a62f3db03cdc98e4681ab2f4f9e17222 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Thu, 10 Oct 2024 20:57:35 +0100 Subject: [PATCH] Fix settings singleton --- Bloxstrap/LaunchHandler.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Bloxstrap/LaunchHandler.cs b/Bloxstrap/LaunchHandler.cs index eae8020..cf7f165 100644 --- a/Bloxstrap/LaunchHandler.cs +++ b/Bloxstrap/LaunchHandler.cs @@ -145,11 +145,13 @@ namespace Bloxstrap bool showAlreadyRunningWarning = Process.GetProcessesByName(App.ProjectName).Length > 1; var window = new UI.Elements.Settings.MainWindow(showAlreadyRunningWarning); - window.Show(); + + // typically we'd use Show(), but we need to block to ensure IPL stays in scope + window.ShowDialog(); } else { - App.Logger.WriteLine(LOG_IDENT, $"Found an already existing menu window"); + App.Logger.WriteLine(LOG_IDENT, "Found an already existing menu window"); var process = Utilities.GetProcessesSafe().Where(x => x.MainWindowTitle == Strings.Menu_Title).FirstOrDefault();