Skip to content

Preserve synth settings missing from older saved slots - #18

Open
mltony wants to merge 1 commit into
tspivey:masterfrom
mltony:fix/preserve-new-synth-settings
Open

mltony wants to merge 1 commit into
tspivey:masterfrom
mltony:fix/preserve-new-synth-settings

Conversation

@mltony

@mltony mltony commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Switching away from Eloquence 64 and back through SwitchSynth reset its Shorten pauses setting from Always to Never. Older saved slots did not contain Eloquence's newer pauseMode setting, and loading a slot replaced the entire synthesizer configuration with that incomplete snapshot, causing the missing setting to fall back to its default.

This fixes settings preservation generically, without special-casing Eloquence or any setting name:

  • Save the active synthesizer's current settings to NVDA's configuration before switching away or taking a slot snapshot.
  • Capture the full per-synth configuration as detached data, including nested sections.
  • Restore explicitly saved slot values while retaining current values for settings missing from an older slot, including nested settings. Base-profile and active-profile values are handled separately.

Explicitly saved values still take priority: changing an option already stored in a slot requires saving that slot again. The fix covers settings stored in NVDA's per-synth configuration; it does not capture unrelated add-on configuration sections or external files.

Also document the restore behavior, add regression tests, and bump the patch version from 1.07.0 to 1.07.1.

Validation

  • python -m unittest discover -s tests -v: all 9 tests pass, covering the Eloquence pause-setting round trip, newly added settings, explicit slot overrides, reloading the same synth, live values when saving, nested settings, configuration profiles, and empty slots.
  • python -m SCons: built switchSynth-1.07.1.nvda-addon; verified the packaged source, version, and archive integrity.
  • Manual verification in running NVDA with Eloquence 64: the patched add-on works correctly, and Shorten pauses remains set to Always after switching to another synth and back.
  • Automated tests simulate NVDA's configuration and synth APIs.

@trypsynth

Copy link
Copy Markdown

How do you know this works with Eloquence 64 properly if you didn't test it with running NVDA?

@mltony

mltony commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

@trypsynth I have tested the patched add-on in a running NVDA instance with Eloquence 64, and it works well. The Shorten pauses setting remains at Always after switching to another synth and back. The description did not reflect that manual testing; I have updated its Validation section to include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants