diff --git a/I18N Commander/UI WinForms/AppEvents.cs b/I18N Commander/UI WinForms/AppEvents.cs index 0e63300..1145e8e 100644 --- a/I18N Commander/UI WinForms/AppEvents.cs +++ b/I18N Commander/UI WinForms/AppEvents.cs @@ -4,7 +4,15 @@ namespace UI_WinForms; internal static class AppEvents { - #region Event: Settings were + internal static void ResetAllSubscriptions() + { + WhenSettingsChanged = null; + WhenSectionChanged = null; + WhenTextElementChanged = null; + WhenTranslationChanged = null; + } + + #region Event: Settings were internal static event EventHandler? WhenSettingsChanged; diff --git a/I18N Commander/UI WinForms/Components/Main.cs b/I18N Commander/UI WinForms/Components/Main.cs index af58cec..b4e1950 100644 --- a/I18N Commander/UI WinForms/Components/Main.cs +++ b/I18N Commander/UI WinForms/Components/Main.cs @@ -16,6 +16,7 @@ public partial class Main : UserControl if(result == DialogResult.Yes) { Program.RestartMainApp = true; + AppEvents.ResetAllSubscriptions(); this.ParentForm!.Close(); } }