diff --git a/mRemoteNG/UI/Controls/ConnectionContextMenu.cs b/mRemoteNG/UI/Controls/ConnectionContextMenu.cs index 320003a8c..a526f84fc 100644 --- a/mRemoteNG/UI/Controls/ConnectionContextMenu.cs +++ b/mRemoteNG/UI/Controls/ConnectionContextMenu.cs @@ -811,6 +811,7 @@ namespace mRemoteNG.UI.Controls if (CTaskDialog.VerificationChecked) { Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; + Settings.Default.Save(); } if (result == DialogResult.No) diff --git a/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.cs b/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.cs index 6b9c7ef6d..f185c1fb5 100644 --- a/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.cs +++ b/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.cs @@ -29,6 +29,17 @@ namespace mRemoteNG.UI.Forms.OptionsPages * 1) chkSaveConnectionsAfterEveryEdit: never used */ chkSaveConnectionsAfterEveryEdit.Visible = false; // Temporary hide control, never used, added: Jun 15, 2024 + + // Reload settings when page becomes visible to reflect any changes made outside the Options dialog + VisibleChanged += ConnectionsPage_VisibleChanged; + } + + private void ConnectionsPage_VisibleChanged(object sender, EventArgs e) + { + if (Visible) + { + LoadSettings(); + } } public override string PageName diff --git a/mRemoteNG/UI/Tabs/ConnectionTab.cs b/mRemoteNG/UI/Tabs/ConnectionTab.cs index a6c1fbddf..3d4f2c53c 100644 --- a/mRemoteNG/UI/Tabs/ConnectionTab.cs +++ b/mRemoteNG/UI/Tabs/ConnectionTab.cs @@ -56,6 +56,7 @@ namespace mRemoteNG.UI.Tabs if (CTaskDialog.VerificationChecked) { Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; + Settings.Default.Save(); } if (result == DialogResult.No) diff --git a/mRemoteNG/UI/Window/ConnectionWindow.cs b/mRemoteNG/UI/Window/ConnectionWindow.cs index f2c9485d9..eb726aab1 100644 --- a/mRemoteNG/UI/Window/ConnectionWindow.cs +++ b/mRemoteNG/UI/Window/ConnectionWindow.cs @@ -298,6 +298,7 @@ namespace mRemoteNG.UI.Window if (CTaskDialog.VerificationChecked) { Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; + Settings.Default.Save(); } if (result == DialogResult.No) @@ -663,6 +664,7 @@ namespace mRemoteNG.UI.Window if (CTaskDialog.VerificationChecked) { Settings.Default.ConfirmCloseConnection = (int)ConfirmCloseEnum.Never; + Settings.Default.Save(); } if (result == DialogResult.No)