Toggle AetherDSP Settings from the DSP-tab ADSP button (#3877). Principle II.#3881
Conversation
…iple II. The per-slice DSP-tab ADSP button was a one-way launcher: ensureAetherDspDialog() is show-or-raise only, so a second press just re-raised the already-visible AetherDSP Settings window and the only way to dismiss it was the title-bar X. Its sibling AetherVoice button is a genuine toggle (toggleAetherialStrip). Add toggleAetherDspDialog() — close() when the dialog is visible (WA_DeleteOnClose deletes it and clears the QPointer; the next press re-creates and re-wires via ensureAetherDspDialog()'s wasFresh path), ensureAetherDspDialog() otherwise — and rewire the single VfoWidget::aetherDspRequested connect to it. The menu action, RX-chain double-click, and chain/strip ADSP launchers keep pure open semantics by calling ensureAetherDspDialog() directly, so the toggle is scoped to the one button the report is about. UI-consistency only; no protocol/audio behavior change. Principle II honored: this is a client-side window-visibility toggle that reads and writes only local UI state (the m_dspDialog QPointer); it sends no command to the radio and does not touch live or persisted radio state, so the radio remains the sole authority on live state. Blast radius: ensureAetherDspDialog impact risk_score=0.250, 6 high-risk affected (top: MainWindow::MainWindow, buildMenuBar, AppSettings::instance). That symbol is unchanged by this fix — its signature and show-or-raise semantics are preserved at every existing caller; only wireVfoWidget's lambda changes, routing through the new wrapper that calls ensureAetherDspDialog() unchanged on the open path. No cross-TU symbol motion, so test-target link surface is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Reviewed the diff against the surrounding code — this is a clean, correct fix for #3877. Thanks for the well-documented change.
Verified the load-bearing assumptions:
- The comment's claim that
close()deletes the dialog and clears theQPointeris accurate:showOrRaisePersistent()setsQt::WA_DeleteOnClose(MainWindow.h:1264), andm_dspDialogis aQPointer<AetherDspDialog>(MainWindow.h:927), so it auto-nulls on delete. - The re-create path is sound: after a close-then-reopen,
ensureAetherDspDialog()'swasFreshbranch (MainWindow.cpp:2509-2513) re-runswireAetherDspWidget(), so the freshly-constructed dialog is fully re-wired rather than silently inert. - The
m_dspDialog && m_dspDialog->isVisible()guard is null-safe, and geometry survives the toggle sincePersistentDialogpersists/restores under itsgeomKeyon close/show. - Scope is tight: only the DSP-tab
aetherDspRequestedwiring switches to the toggle; the Settings menu action and RX-chain/strip launchers (MainWindow.cpp:7246) correctly keep pure open-via-ensureAetherDspDialog()semantics, as the comment states.
Minor, non-blocking: the cited sibling toggleAetherialStrip() toggles via hide()/show() on a persistent widget, whereas this destroys and re-creates because the DSP dialog is WA_DeleteOnClose. That's the right call given the dialog's design and the UX is identical — just noting the mechanisms differ in case a future reader expects them to match line-for-line. No change needed.
LGTM. 73
🤖 aethersdr-agent · cost: $2.5058 · model: claude-opus-4-8
ten9876
left a comment
There was a problem hiding this comment.
Approved. Verified the toggle is correct and null-safe: m_dspDialog is a QPointer with WA_DeleteOnClose (set by showOrRaisePersistent), so close() deletes + auto-nulls it, and the recreate path re-wires via ensureAetherDspDialog()'s wasFresh branch (wireAetherDspWidget). Scope is tight — only the DSP-tab button toggles; the menu action and RX-chain launcher keep pure-open semantics. Geometry persists via PersistentDialog. Not a keying path. CI green on all 6. (Minor: the 'Principle II' citation doesn't really apply to a UI toggle — cosmetic only.)
Summary
Fixes #3877
What was changed
Toggle AetherDSP Settings from the DSP-tab ADSP button (#3877). Principle II.
Files modified
src/gui/MainWindow.cppsrc/gui/MainWindow.hsrc/gui/MainWindow_Wiring.cppGenerated by AetherClaude (automated agent for AetherSDR)
🤖 aethersdr-agent · cost: $2.1156 · model: claude-opus-4-8