Add Spot Lines toggle to SpotHub Display settings#2349
Conversation
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>
There was a problem hiding this comment.
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 SpotShowLines → IsSpotsLinesEnabled, 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
left a comment
There was a problem hiding this comment.
Useful fix, thanks Ian.
|
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 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) |
…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>
Summary
Fixes #2348
AppSettingskeyIsSpotsLinesEnabled, defaults toEnabled, takes effect immediately without a restartBackground
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:
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.h—m_spotShowLinesmember +setSpotShowLines()/spotShowLines()accessors (naming followssetSpotOverrideColors/setSpotOverrideBgconvention)src/gui/SpectrumWidget.cpp— guarddrawLinewithif (m_spotShowLines)src/gui/DxClusterDialog.cpp— Spot Lines toggle row in Display tab, persists asIsSpotsLinesEnabledsrc/gui/SpotSettingsDialog.cpp— matching toggle in legacy dialog with unified tooltip textsrc/gui/MainWindow.cpp— load and applyIsSpotsLinesEnabledon startup and live reloadTest plan