Skip to content

Surface dBm-scale Ctrl-drag zoom via tooltip + help docs (#2724). Principle III.#2726

Merged
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-2724
May 16, 2026
Merged

Surface dBm-scale Ctrl-drag zoom via tooltip + help docs (#2724). Principle III.#2726
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-2724

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #2724

What was changed

Surface dBm-scale Ctrl-drag zoom via tooltip + help docs (#2724). Principle III.

Files modified

  • resources/help/configuring-aethersdr-controls.md
  • src/gui/SpectrumWidget.cpp
 resources/help/configuring-aethersdr-controls.md |  3 +++
 src/gui/SpectrumWidget.cpp                       | 13 +++++++++++++
 2 files changed, 16 insertions(+)

Generated by AetherClaude (automated agent for AetherSDR)

…nciple III.

The Ctrl-drag span-zoom shortcut shipped in #2717 is invisible: only the
arrow buttons advertise the strip is interactive. This wires a hover
tooltip on the dBm strip listing the three operations (drag pans,
Ctrl/Cmd-drag zooms, arrows step by 10 dB) and adds the same three
bullets to the panadapter-actions section of
resources/help/configuring-aethersdr-controls.md.

The tooltip is built next to the existing strip-cursor branch in
SpectrumWidget::mouseMoveEvent and uses the same per-region
QToolTip::showText pattern as band-plan-spot hovers — Qt auto-hides it
when the cursor leaves the strip rect. On macOS the modifier line
mentions both Ctrl and Cmd to mirror the existing mousePressEvent
modifier acceptance.

Principle III applies: user-facing prose uses the on-screen labels
(arrow glyphs, "dBm scale") and the modifier name the user actually
types on their platform.

Blast radius: PreToolUse hook flagged risk_score=0.321 with 9
high-risk callers (MainWindow::MainWindow, buildUI, wirePanadapter,
buildMenuBar, registerShortcutActions, ...). The edit is purely
additive inside an existing branch of mouseMoveEvent — no signature,
signal, slot, or control-flow change. Those callers wire SpectrumWidget
signals up; none observe the dBm strip's hover-tooltip text, so the
file-level coupling does not translate into a behavioural ripple.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@aethersdr-agent aethersdr-agent Bot requested a review from ten9876 as a code owner May 16, 2026 07:15
@aethersdr-agent aethersdr-agent Bot enabled auto-merge (squash) May 16, 2026 07:15
@ten9876 ten9876 merged commit 404b94f into main May 16, 2026
5 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-2724 branch May 16, 2026 15:28
ten9876 added a commit that referenced this pull request May 16, 2026
…ow-up)

PR #2726's dBm-scale tooltip used:

    static const QString tip = QStringLiteral(
        "..."
    #ifdef Q_OS_MAC
        "..."
    #else
        "..."
    #endif
        "...");

Preprocessor directives inside a function-like macro call are undefined
behaviour per the C++ standard.  GCC and Clang accept the construct,
MSVC strictly rejects it:

    SpectrumWidget.cpp(3328): error C2121: '#': invalid character:
    possibly the result of a macro expansion
    SpectrumWidget.cpp(3328): error C2146: syntax error: missing ')'
    before identifier 'ifdef'

#2726's check-windows step was SKIPPED via path filter so the bug
landed on main unnoticed.  PR #2732's broader file touches caused a
non-skipped check-windows run which surfaced it.

Fix: drop the QStringLiteral macro and use plain adjacent-string-
literal concatenation.  Preprocessor directives sit at the
preprocessor level rather than inside a macro argument and resolve
before the C++ parser sees the assignment.  Static const QString
initialised once at first use — runtime UTF-16 conversion has no
measurable cost in this path.

Rolling into the PLC PR rather than a separate fix-on-main since the
PLC PR already touches SpectrumWidget.cpp and the merge would have
hit this on Windows anyway.

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.

dBm scale: tooltip / docs for Ctrl-drag zoom shortcut

1 participant