Skip to content

Remove filter passband shading from waterfall display (#1270)#1701

Closed
M7HNF-Ian wants to merge 1 commit into
aethersdr:mainfrom
M7HNF-Ian:fix/1270-filter-shading-not-in-waterfall
Closed

Remove filter passband shading from waterfall display (#1270)#1701
M7HNF-Ian wants to merge 1 commit into
aethersdr:mainfrom
M7HNF-Ian:fix/1270-filter-shading-not-in-waterfall

Conversation

@M7HNF-Ian

Copy link
Copy Markdown
Contributor

Summary

The slice filter passband fill (the semi-transparent coloured region showing the receiver filter bandwidth) was drawn in both the spectrum trace and the waterfall area. The waterfall is a historical record of received RF signals — painting a UI affordance on top of it made the passband look like real signal energy in the history and tinted the signal colours within the passband.

One fillRect call removed from drawSliceMarkers(). The spectrum shading is unchanged.

What's kept unchanged

  • Spectrum shading — still drawn in specRect, exactly as before.
  • Filter edge lines — already restricted to specRect.top()→specRect.bottom(), unaffected.
  • TNF overlays — intentionally span both regions (they represent an active notch and are the drag target); those are unchanged.

Test plan

  • With a slice active, confirm the coloured filter passband shading appears on the spectrum trace as normal
  • Scroll the waterfall back in time — no coloured tint should appear in the waterfall for the filter passband region
  • With multiple slices, confirm each slice's colour shading is absent from the waterfall
  • Confirm TNF overlays still appear across both spectrum and waterfall (drag handle behaviour unchanged)

🤖 Generated with Claude Code

The slice filter passband fill was being drawn in both the spectrum trace
and the waterfall area. The waterfall is a historical record of received
RF signals; overlaying a UI affordance on it made the passband appear as
if there were actual signal energy at those frequencies throughout history,
and tinted the received-signal colours in the passband region.

Fix: paint the filter shading only in specRect (the spectrum trace area).
The waterfall fillRect is removed. Filter edge lines already drew only in
specRect (specRect.top()→specRect.bottom()), so those are unaffected.

TNF (Tunable Notch Filter) overlays span both regions intentionally — they
represent an active notch and serve as a draggable handle; those are
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@M7HNF-Ian M7HNF-Ian requested a review from ten9876 as a code owner April 19, 2026 18:07

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean, well-scoped change. Removing the single fillRect call for the waterfall region is the right fix for #1270 — the passband tint over the waterfall history was misleading and obscured actual signal colours.

Verified:

  • Spectrum shading is untouched (the specRect fillRect remains).
  • Filter edge lines were already clipped to specRect, unaffected.
  • TNF overlays span both regions intentionally and are not touched.
  • Only one file changed, tightly within the stated scope.
  • No bugs, no null-pointer risks, no resource issues.

The updated comment explaining why the waterfall fill was removed is a nice touch — future readers won't re-add it by accident.

Looks good to me. Thanks for the contribution, @Chaosuk97!

@ten9876

ten9876 commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Claude here on behalf of Jeremy — landed direct on main as `b0ae81f` (Ian preserved as git author).

Interesting finding during review: the waterfall `fillRect` you removed wasn't actually visible on Jeremy's GPU-rendered build anyway — `drawSliceMarkers` is only reached by the software-fallback paintEvent path. So this removes inconsistently-applied code and brings the CPU-render path in line with what the GPU path was already showing. Good catch.

Thanks Ian!

73, Jeremy KK7GWY & Claude (AI dev partner)

@ten9876 ten9876 closed this Apr 21, 2026
ten9876 pushed a commit that referenced this pull request Apr 21, 2026
TNF UX rework contributed by Robbie Foust (rfoust). Applied from PR #1547
with the two non-TNF scopes stripped out and two Copilot review items
addressed:

- Stripped: overlay texture format change (RGBA8 → BGRA8 with fallback,
  QImage Format_RGBA8888_Premultiplied → Format_ARGB32_Premultiplied).
  Unrelated to TNF, affects every overlay rendering, no stated reason —
  revisit separately if a driver-specific need surfaces.
- Kept: cursor-tracking refactor (`updateTrackedCursorState`).  Intertwined
  with TNF hover detection (`m_hoveredTnfId`), extracting it would have
  required rewriting the hover logic.
- Fixed: added `#include <algorithm>` to TnfModel.cpp for the newly-used
  `std::max` / `std::clamp` — relying on transitive includes is fragile.
- Fixed: TNF context-menu header `QWidgetAction` is now
  `WA_TransparentForMouseEvents` + `setEnabled(false)` so clicking the
  freq/width info block no longer closes the menu.

TNF changes preserved intact:
- Markers stop at the bottom of the spectrum pane (no waterfall extend).
- Hatched depth visualisation (12/8/5 px spacing for depth 1/2/3).
- Floating `RF Tracking Notch` popup on hover showing freq + width.
- Width/depth submenu checkmarks show current value.
- Bidirectional TNF drag: horizontal tunes, vertical resizes via
  2^(-dy/48) octaves, clamped 10-12000 Hz.
- Preferred-TNF hit-testing for overlapping notches.
- Tune guides suppressed while a TNF is hovered or dragged.
- TnfModel: optimistic local updates in setters, width parser tolerates
  both Hz ("width=100") and fractional-MHz forms for firmware variance.

Rebased onto current main (#1703 cursor-snap and #1701 filter-passband
changes merged cleanly into rfoust's cursor-tracking refactor).

Unaddressed follow-ups (intentional deferrals):
- #1547 removes `QToolTip::hideText()` when the cursor leaves a spot
  label; stale tooltip could linger. Needs a small re-add.
- `updateTrackedCursorState` is only called for spectrum-area hover; the
  waterfall path still leaves `m_cursorPos` / `m_hoveredTnfId` stale in
  the software paintEvent render path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@M7HNF-Ian M7HNF-Ian deleted the fix/1270-filter-shading-not-in-waterfall branch June 7, 2026 14:58
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