Persist
Pressing OK in the JACK server dialog now clears the stored original settings so the close handler doesn’t revert them, ensuring the new devices remain active
This commit is contained in:
@@ -561,6 +561,8 @@ const JackServerSettingsDialog = withStyles(
|
||||
}
|
||||
let s = this.state.jackServerSettings.clone();
|
||||
s.valid = true;
|
||||
// Accept the new settings so handleClose doesn't revert
|
||||
this.originalJackServerSettings = undefined;
|
||||
this.props.onApply(s);
|
||||
|
||||
|
||||
|
||||
@@ -2525,6 +2525,10 @@ export class PiPedalModel //implements PiPedalModel
|
||||
});
|
||||
}
|
||||
setJackServerSettings(jackServerSettings: JackServerSettings): void {
|
||||
// Update the local observable so the UI reflects the new selection
|
||||
// immediately. Persist the settings via the websocket as well.
|
||||
this.jackServerSettings.set(jackServerSettings.clone());
|
||||
|
||||
this.webSocket?.request<void>("setJackServerSettings", jackServerSettings)
|
||||
.catch((error) => {
|
||||
this.showAlert(error);
|
||||
|
||||
Reference in New Issue
Block a user