Skip to content

Honor FFT Line slider on QPainter (software) render path (#2722). Principle III.#2826

Merged
aethersdr-agent[bot] merged 1 commit into
mainfrom
aetherclaude/issue-2722
May 18, 2026
Merged

Honor FFT Line slider on QPainter (software) render path (#2722). Principle III.#2826
aethersdr-agent[bot] merged 1 commit into
mainfrom
aetherclaude/issue-2722

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #2722

What was changed

Honor FFT Line slider on QPainter (software) render path (#2722). Principle III.

Files modified

  • src/gui/SpectrumWidget.cpp
 src/gui/SpectrumWidget.cpp | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

…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>
@aethersdr-agent aethersdr-agent Bot enabled auto-merge (squash) May 18, 2026 01:07

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 at src/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.cpp and the existing AppSettings persistence 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 jensenpat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Activate line slider control for non-GPU panadapter drawing.

@aethersdr-agent aethersdr-agent Bot merged commit 4d5b4d7 into main May 18, 2026
5 checks passed
@aethersdr-agent aethersdr-agent Bot deleted the aetherclaude/issue-2722 branch May 18, 2026 02:02
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>
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.

FFT line slider has no effect on Windows 11

1 participant