DlgPrefMixer: add option to reset EQ kill switches on track load - #16796
DlgPrefMixer: add option to reset EQ kill switches on track load#16796gary-gdbsystems wants to merge 3 commits into
Conversation
Previously "Reset equalizers on track load" also reset the EQ kill switches, with no way to reset the kill switches independently. Add a separate "Reset EQ kill switches on track load" option and decouple the reset logic in BaseTrackPlayerImpl::slotLoadTrack(): - EqAutoReset resets the EQ knobs - EqAutoReset OR EqKillAutoReset resets the kill switches This keeps existing behavior: users who had EqAutoReset enabled still get their kill switches reset, and the new key defaults off so nothing changes until it is enabled. Following the design discussed in the issue, the kill-switch checkbox is forced on and disabled while "Reset equalizers on track load" is active (since resetting the equalizers inherently resets the kill switches); the user's own setting is preserved and restored when equalizer reset is turned off again. Resolves mixxxdj#10684. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The new EQ-kill-reset checkbox was missing from the dialog's explicit <tabstops> order (so keyboard Tab skipped it) and the parent layout's stretch list still had 7 entries for 8 items. Add the tabstop between the EQ and gain reset checkboxes and extend the stretch list to 8. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| <string>Resets the EQ kill switches when loading a track. This is always enabled while "Reset equalizers on track load" is active, because resetting the equalizers also resets the kill switches.</string> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Reset EQ kill switches on track load</string> |
There was a problem hiding this comment.
For symmetry with "Reset equalizers on track load":
| <string>Reset EQ kill switches on track load</string> | |
| <string>Reset equalizer kill switches on track load</string> |
Review feedback: use "Reset equalizer kill switches on track load" for symmetry with the sibling "Reset equalizers on track load" checkbox. Update the tooltip wording to match.
|
Thanks. Renamed to "Reset equalizer kill switches on track load" and updated the tooltip to match. Screenshot updated. |
| void DlgPrefMixer::updateEqKillAutoResetState() { | ||
| const bool eqReset = CheckBoxEqAutoReset->isChecked(); | ||
| CheckBoxEqKillAutoReset->setEnabled(!eqReset); | ||
| CheckBoxEqKillAutoReset->setChecked(eqReset || m_eqKillAutoReset); |
There was a problem hiding this comment.
Is there a reason not to use m_eqAutoReset which is set above when the EQ checkbox is toggled?
| void DlgPrefMixer::updateEqKillAutoResetState() { | |
| const bool eqReset = CheckBoxEqAutoReset->isChecked(); | |
| CheckBoxEqKillAutoReset->setEnabled(!eqReset); | |
| CheckBoxEqKillAutoReset->setChecked(eqReset || m_eqKillAutoReset); | |
| void DlgPrefMixer::updateEqKillAutoResetState() { | |
| CheckBoxEqKillAutoReset->setEnabled(!m_eqAutoReset); | |
| CheckBoxEqKillAutoReset->setChecked(m_eqAutoReset || m_eqKillAutoReset); |
|
Thank you for this nice addition @gary-gdbsystems Here's the paperwork: |
Summary
Resolves #10684.
Previously "Reset equalizers on track load" also reset the EQ kill switches, so there was no way to reset the kill switches independently of the EQ knobs — the request in this issue.
Approach
Add a separate "Reset EQ kill switches on track load" option (
[Mixer Profile]/EqKillAutoReset) and decouple the reset logic inBaseTrackPlayerImpl::slotLoadTrack():EqAutoReset→ resets the EQ knobsEqAutoResetorEqKillAutoReset→ resets the kill switchesBackward compatible: users who had
EqAutoResetenabled still get their kill switches reset (via the||), and the new key defaults off, so nothing changes until it is enabled.UI coupling
Following @JosepMaJAZ's proposal in the thread (which @ronso0 endorsed), the kill-switch checkbox is forced on and disabled while "Reset equalizers on track load" is active, because resetting the equalizers inherently resets the kill switches. The user's own kill-switch setting is preserved and restored when equalizer reset is turned off again.
I chose the coupled variant over three fully independent checkboxes because it is backward compatible — a fully independent design would silently stop resetting kill switches for existing
EqAutoResetusers unless their config were migrated. Happy to adjust if maintainers prefer otherwise.Changes
src/mixer/basetrackplayer.cpp— decouple knob vs kill-switch reset; read the new config key.src/preferences/dialog/dlgprefmixer.{cpp,h}— new checkbox load/save/default wiring + coupling logic.src/preferences/dialog/dlgprefmixerdlg.ui— new checkbox.Screenshots
Before — EQ / gain / stem reset options:
After (default) — new independent "Reset EQ kill switches on track load":
After (coupled) — with "Reset equalizers" enabled, the kill option is forced on and locked:
Testing
uicregeneration of the dialog).