From d46f77bb6176f3d78f744cf9003f510985f1dc70 Mon Sep 17 00:00:00 2001 From: Extremesecrecy <10959169+extremesecrecy@users.noreply.github.com> Date: Sun, 27 Jul 2025 13:51:42 -0700 Subject: [PATCH] Update JackServerSettingsDialog.tsx Persistence change so that we can actually go on with OK --- vite/src/pipedal/JackServerSettingsDialog.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vite/src/pipedal/JackServerSettingsDialog.tsx b/vite/src/pipedal/JackServerSettingsDialog.tsx index 55d0966..a52dfd0 100644 --- a/vite/src/pipedal/JackServerSettingsDialog.tsx +++ b/vite/src/pipedal/JackServerSettingsDialog.tsx @@ -529,11 +529,11 @@ const JackServerSettingsDialog = withStyles( super.componentWillUnmount(); this.mounted = false; this.stopStatusTimer(); + // Removed the saveSettings call from here. + // Persistence should only happen on explicit OK/PROCEED. if (this.originalJackServerSettings) { // Revert any unapplied changes when the dialog is unmounted this.applySettings(this.originalJackServerSettings); - // Persist the original settings so future dialogs show them - this.saveSettings(this.originalJackServerSettings); this.originalJackServerSettings = undefined; } } @@ -696,7 +696,9 @@ const JackServerSettingsDialog = withStyles( if (this.originalJackServerSettings) { // Revert any applied settings this.applySettings(this.originalJackServerSettings); - this.saveSettings(this.originalJackServerSettings); + // IMPORTANT: Removed the saveSettings call here. + // If the user cancels, we only want to revert the active settings, + // not overwrite the permanently saved settings with the old ones. this.originalJackServerSettings = undefined; } } @@ -881,4 +883,4 @@ const JackServerSettingsDialog = withStyles( }, styles); -export default JackServerSettingsDialog; \ No newline at end of file +export default JackServerSettingsDialog;