Honor FFT Line slider on QPainter (software) render path (#2722). Principle III.#2826
Merged
Merged
Conversation
…nciple III. The earlier fix in 44163fc (PR #2706) for issue #2705 patched only the QRhi/GPU render path in renderGpuFrame(). The parallel software path in drawSpectrum() hardcoded a 1.5 px pen and ignored m_fftLineWidth, so the Display → "FFT Line:" slider was a no-op for any user whose build lacked GPU acceleration (e.g., Windows builds where the AETHER_GPU_SPECTRUM CMake block was disabled because Qt6GuiPrivate was not found at configure time — confirmed in support-bundle-20260516-005340 which contains neither the QRhi success nor failure log line). Fix in src/gui/SpectrumWidget.cpp::drawSpectrum: - Use m_fftLineWidth on a cosmetic QPen so the requested pixel width survives high-DPI scaling on Windows. - Skip the line draw entirely when m_fftLineWidth <= 0 ("Off"), mirroring the GPU path's behavior at L5065. - Apply to both the heat-map and solid-fill branches. Also call update() from setFftLineWidth() so the slider takes effect immediately even when no FFT stream is flowing (matches the pattern in setFftFillAlpha / setFftFillColor that already call markOverlayDirty()). Honors Principle III: the UI label "FFT Line:" on the Display menu is the user-facing contract; making the slider inert on one of two render paths breaks that contract. Blast radius: risk_score=0.310, 10 high-risk affected (top: MainWindow::MainWindow, MainWindow::wirePanadapter, MainWindow::buildUI). The seed change is internal to drawSpectrum's rendering branch and setFftLineWidth's repaint trigger; the high-risk callers depend on SpectrumWidget instantiation/wiring, not on the rendering details modified here, so the wide reported surface does not reflect actual behavioral reach. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2 tasks
Contributor
Author
There was a problem hiding this comment.
Looks good. The fix is minimal and addresses the real bug: the software drawSpectrum path was hardcoding a 1.5 pen width and ignoring m_fftLineWidth entirely, so the slider couldn't take effect on systems falling back to the QPainter renderer.
A few things that are right:
- Mirrors GPU semantics correctly. The
m_fftLineWidth > 0.0f"Off" branch matches the GPU path atsrc/gui/SpectrumWidget.cpp:5065, so behavior is consistent across renderers. - Cosmetic pen for high-DPI.
setCosmetic(true) + setWidthF(...)is the right Qt idiom — the requested width is in device pixels and survives the DPR multiplier on Windows scaled displays, which is the exact failure mode reported in #2722. update()in the setter ensures the slider produces an immediate repaint instead of waiting for the next FFT frame — a small but useful UX improvement.- Scope is contained to
SpectrumWidget.cppand the existingAppSettingspersistence is preserved.
No issues from me on conventions, lifetimes, or error handling. Thanks @aethersdr-agent for the surgical fix and for explicitly cross-referencing the GPU path in the comment — that's the kind of breadcrumb that keeps the two renderers from drifting.
jensenpat
approved these changes
May 18, 2026
jensenpat
left a comment
Collaborator
There was a problem hiding this comment.
Activate line slider control for non-GPU panadapter drawing.
This was referenced May 18, 2026
ten9876
added a commit
to K5PTB/AetherSDR
that referenced
this pull request
May 23, 2026
…inter path The rebase accidentally reverted PR aethersdr#2826 (commit 4d5b4d7). Restoring src/gui/SpectrumWidget.cpp from current main brings back: - setFftLineWidth() update() trigger so slider repaints immediately - drawLine = m_fftLineWidth > 0.0f "off" gate - cosmetic pen built from m_fftLineWidth so slider value is honored - and the unrelated improvements that landed after PR base (panadapter center clamp aethersdr#2867, waterfall stale-echo animation guard) All rigctld work in this PR is unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2722
What was changed
Honor FFT Line slider on QPainter (software) render path (#2722). Principle III.
Files modified
src/gui/SpectrumWidget.cppGenerated by AetherClaude (automated agent for AetherSDR)