From c82c465620cd48e3b0bf8140ead69f1b0dc94201 Mon Sep 17 00:00:00 2001 From: Extremesecrecy <10959169+extremesecrecy@users.noreply.github.com> Date: Sun, 27 Jul 2025 13:05:18 -0700 Subject: [PATCH] Update JackServerSettingsDialog.tsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added an explicit reset for the dialog’s close guard when the dialog mounts or reopens, preventing saved settings from reverting after pressing OK Modified the close handler to skip reverting settings whenever the dialog was closed via the OK path --- vite/src/pipedal/JackServerSettingsDialog.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vite/src/pipedal/JackServerSettingsDialog.tsx b/vite/src/pipedal/JackServerSettingsDialog.tsx index 9a09a99..d4f41f2 100644 --- a/vite/src/pipedal/JackServerSettingsDialog.tsx +++ b/vite/src/pipedal/JackServerSettingsDialog.tsx @@ -491,6 +491,7 @@ const JackServerSettingsDialog = withStyles( componentDidMount() { super.componentDidMount(); this.mounted = true; + this.ignoreClose = false; if (this.props.open) { this.requestAlsaInfo(); this.startStatusTimer(); @@ -499,6 +500,7 @@ const JackServerSettingsDialog = withStyles( } componentDidUpdate(oldProps: JackServerSettingsDialogProps) { if ((this.props.open && !oldProps.open) && this.mounted) { + this.ignoreClose = false; this.saveSettingsTemporary(this.props.jackServerSettings); // When opening, preserve the current settings until ALSA device // information is loaded. If we don't have device info yet, just @@ -683,7 +685,6 @@ const JackServerSettingsDialog = withStyles( //Ignore close rutine if the ignoreclose is true. (After OK or Proceed or Multi Device Warning) const handleClose = () => { if (this.ignoreClose) { - this.ignoreClose = false; return; } else { this.releaseDevices();