Skip to content

Add Spot Lines toggle to SpotHub Display settings#2349

Merged
ten9876 merged 3 commits into
aethersdr:mainfrom
M7HNF-Ian:feat/spot-lines-toggle
May 5, 2026
Merged

Add Spot Lines toggle to SpotHub Display settings#2349
ten9876 merged 3 commits into
aethersdr:mainfrom
M7HNF-Ian:feat/spot-lines-toggle

Conversation

@M7HNF-Ian

@M7HNF-Ian M7HNF-Ian commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #2348

  • Adds a Spot Lines: Enabled / Disabled toggle to the SpotHub → Display tab and the legacy Spot Settings dialog
  • When disabled, the vertical dotted lines drawn from the spectrum up to each spot label are hidden
  • Setting persists via AppSettings key IsSpotsLinesEnabled, defaults to Enabled, takes effect immediately without a restart
  • No behaviour change for existing users

Background

During contest operation the panadapter can display dozens or hundreds of DX spots simultaneously. Each spot renders a vertical dotted line from the base of the spectrum up to its label. With a full contest band this creates a dense forest of vertical lines that obscures the FFT trace and makes it difficult to read signal activity.

User feedback:

"During a contest activity when there are dozens and dozens of spotdx appearing on the Panadapter it is annoying to see the vertical lines under the spotdx. Give an option to remove them."

The toggle lets contest operators declutter the panadapter without disabling spots entirely — callsigns and frequencies remain visible, the vertical noise is removed.

Files modified

  • src/gui/SpectrumWidget.hm_spotShowLines member + setSpotShowLines() / spotShowLines() accessors (naming follows setSpotOverrideColors / setSpotOverrideBg convention)
  • src/gui/SpectrumWidget.cpp — guard drawLine with if (m_spotShowLines)
  • src/gui/DxClusterDialog.cpp — Spot Lines toggle row in Display tab, persists as IsSpotsLinesEnabled
  • src/gui/SpotSettingsDialog.cpp — matching toggle in legacy dialog with unified tooltip text
  • src/gui/MainWindow.cpp — load and apply IsSpotsLinesEnabled on startup and live reload

Test plan

  • Default state: spot lines visible as before — no regression
  • Toggle off in SpotHub → Display: vertical lines hidden, spot labels and callsigns remain
  • Toggle off in Spot Settings dialog: same result
  • Setting persists across application restart
  • Works correctly with multiple panadapters open
  • Confirm with 0 spots, a handful, and a busy contest band

Adds a Spot Lines: Enabled/Disabled toggle to SpotHub → Display tab.
When disabled, the vertical dotted lines drawn from the spectrum base up
to each spot label are hidden. Useful during contest operation where
dozens of simultaneous spots create visual clutter that obscures the FFT
trace. Spot callsigns and frequencies remain fully visible.

Setting persists via AppSettings key SpotShowLines, defaults to Enabled,
and takes effect immediately without a restart.
Per triage feedback on PR aethersdr#2349, align naming with the existing
IsSpotsEnabled / IsSpotsOverrideColorsEnabled / setSpotOverrideColors
pattern:

- AppSettings key: SpotShowLines → IsSpotsLinesEnabled
- SpectrumWidget setter: setSpotLines → setSpotShowLines
- SpectrumWidget getter: spotLines() → spotShowLines()
- SpectrumWidget member: m_spotLines → m_spotShowLines
- SpotSettingsDialog member: m_spotLines → m_spotShowLines

Add a one-shot migration in MainWindow ctor to silently upgrade any
saved SpotShowLines key to IsSpotsLinesEnabled on first run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@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.

Thanks for the contribution, @M7HNF-Ian — clean, well-scoped change that solves a real contest-operator pain point. Code follows existing conventions (AppSettings via s.value/s.save, mirrored controls between DxClusterDialog Display tab and SpotSettingsDialog, default "True" preserves existing behavior, live-apply through the same buildMenuBar/wirePanadapter paths used by the other spot settings).

A few minor things worth a look — none are blockers:

1. PR description is stale on the settings key name. The description (and test plan) says the setting persists as SpotShowLines, but the code actually uses IsSpotsLinesEnabled everywhere (with a migration block for the old name). The migration in MainWindow.cpp is the only thing that references SpotShowLines. Worth updating the PR body so reviewers and future readers aren't confused.

2. The migration block (MainWindow.cpp ~L918–922) likely isn't needed. It migrates SpotShowLinesIsSpotsLinesEnabled, but since SpotShowLines was never in a released build, no real users will have that key set. Unless you know testers ran an earlier draft of this branch and need their settings preserved, you could just drop the migration block and pick one key name from the start. Harmless to leave in, just dead weight.

3. Tiny consistency nit on tooltip text. The DxClusterDialog tooltip says "Show vertical lines from the spectrum up to each spot label.\nDisable during contests to reduce clutter." but the SpotSettingsDialog tooltip just says "Show vertical lines from the spectrum up to each spot label". Same control, would be nice to have the same tooltip in both places.

The drawing guard in SpectrumWidget::drawSpotMarkers is the right surgical change — placement is correct and the per-marker placement loop still runs so label layout is unaffected when lines are off. Default-on behavior + live apply via setSpotShowLines() matches how the other spot toggles already work.

Looks good once the description is updated. Nice work on a tightly-scoped UX win.

- Remove the SpotShowLines → IsSpotsLinesEnabled migration block from
  MainWindow ctor: the old key was never in a released build so no real
  users can have it set, making the migration dead weight.
- Align SpotSettingsDialog tooltip with DxClusterDialog: both now say
  "Show vertical lines from the spectrum up to each spot label.\nDisable
  during contests to reduce clutter." (was truncated in legacy dialog).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jensenpat jensenpat enabled auto-merge (squash) May 5, 2026 03:06

@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.

Useful fix, thanks Ian.

@ten9876 ten9876 merged commit a19056a into aethersdr:main May 5, 2026
5 checks passed
@ten9876

ten9876 commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Claude here on Jeremy's behalf — merged via admin squash. Welcome to AetherSDR Ian, and 73 from KK7GWY! Lovely first contribution: tightly scoped, addresses real contest-op pain, preserves backward compatibility, follows existing conventions. The single-line if (m_spotShowLines) render guard is exactly the right surgical shape.

Thanks for filing #2348 alongside — issue + fix in one bundle is the cleanest pattern. Looking forward to seeing more from you.

73, Jeremy KK7GWY & Claude (AI dev partner)

ten9876 added a commit that referenced this pull request May 6, 2026
…2380) (#2394)

SpotHub (DX cluster / RBN) did not automatically reconnect after a Wi-Fi
drop or any other failed connection attempt. The app would try once when
the network came back, fail, and stop retrying — requiring a manual
reconnect.

Root cause: Qt's QAbstractSocket only emits disconnected() on a Connected
→ Unconnected transition. When a socket fails during ConnectingState
(host blocked, refused, or timed out), Qt emits errorOccurred but NOT
disconnected. The reconnect timer was only armed inside onDisconnected(),
so a single failed connect attempt permanently halted the backoff chain.

Two additional failure paths had the same gap: onSocketError() emitted
the UI error only and never re-armed the timer, and the 10-second connect
timeout lambda called abort() without scheduling a retry.

Fix: extracts a scheduleReconnect() helper called from all three failure
paths, with two guards — m_intentionalDisconnect (don't override
user-initiated disconnect) and m_reconnectTimer->isActive() (prevents
double-scheduling when errorOccurred and the connect timeout both fire
for the same failed attempt). A per-call epoch counter (m_connectEpoch)
captured by the timeout lambda ensures a stale timeout from attempt N
cannot abort a later attempt N+1 that has since succeeded.
connectToCluster() also now rejects calls when the socket is already in
ConnectingState to prevent overlapping attempts during rapid retries.

Backoff sequence is unchanged: 5 s → 10 s → 20 s → 40 s → 60 s (cap).

Cherry-picked from PR #2388 (M7HNF-Ian). The rest of that branch contained
already-merged commits (#2349 Spot Lines toggle, #2386 TCI crash fix), the
rejected #2387 spectrum fix, and two unrelated spot-lines naming-refinement
commits that belong in their own focused PR.

Co-authored-by: Ian M7HNF <idimmock@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@M7HNF-Ian M7HNF-Ian deleted the feat/spot-lines-toggle 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.

SpotHub: option to hide vertical spot lines on panadapter

3 participants