From ab9fd21cac324fd3e902ae91c7969c86f646b74f Mon Sep 17 00:00:00 2001 From: oualid Date: Fri, 17 Dec 2021 20:21:43 +0100 Subject: [PATCH] Fix: About button opens multiple dialogs When clicking on about button more than one time, it opens a new dialog when closing it the old one can't be closed which forces the user to restart the app. --- UnrealBinaryBuilder/MainWindow.xaml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UnrealBinaryBuilder/MainWindow.xaml.cs b/UnrealBinaryBuilder/MainWindow.xaml.cs index ddba5c6..91adca7 100644 --- a/UnrealBinaryBuilder/MainWindow.xaml.cs +++ b/UnrealBinaryBuilder/MainWindow.xaml.cs @@ -1699,7 +1699,8 @@ private void OpenSettingsBtn_Click(object sender, RoutedEventArgs e) private void AboutBtn_Click(object sender, RoutedEventArgs e) { GameAnalyticsCSharp.AddDesignEvent("AboutDialog:Open"); - aboutDialog = Dialog.Show(new AboutDialog(this)); + if (aboutDialog is null || aboutDialog.IsClosed) + aboutDialog = Dialog.Show(new AboutDialog(this)); } public void CloseAboutDialog()