Surface dBm-scale Ctrl-drag zoom via tooltip + help docs (#2724). Principle III.#2726
Merged
Conversation
…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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mdsrc/gui/SpectrumWidget.cppGenerated by AetherClaude (automated agent for AetherSDR)