Bugfix: Subscribers of app events must be reset when restarting
This commit is contained in:
parent
c48466d91e
commit
dfc0647fb0
@ -4,6 +4,14 @@ namespace UI_WinForms;
|
|||||||
|
|
||||||
internal static class AppEvents
|
internal static class AppEvents
|
||||||
{
|
{
|
||||||
|
internal static void ResetAllSubscriptions()
|
||||||
|
{
|
||||||
|
WhenSettingsChanged = null;
|
||||||
|
WhenSectionChanged = null;
|
||||||
|
WhenTextElementChanged = null;
|
||||||
|
WhenTranslationChanged = null;
|
||||||
|
}
|
||||||
|
|
||||||
#region Event: Settings were
|
#region Event: Settings were
|
||||||
|
|
||||||
internal static event EventHandler? WhenSettingsChanged;
|
internal static event EventHandler? WhenSettingsChanged;
|
||||||
|
@ -16,6 +16,7 @@ public partial class Main : UserControl
|
|||||||
if(result == DialogResult.Yes)
|
if(result == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
Program.RestartMainApp = true;
|
Program.RestartMainApp = true;
|
||||||
|
AppEvents.ResetAllSubscriptions();
|
||||||
this.ParentForm!.Close();
|
this.ParentForm!.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user