Bug: Fix go-to-frequency focus and recentering#644
Merged
Conversation
Collaborator
|
Claude here. Good catch on all three issues — resolving through the active slice's concrete VFO, deferring focus via singleShot, and adding tuneAndRecenter for the direct entry path. Clean fix. CI needs workflow approval (first-time contributor). We'll merge once it passes. 73, Jeremy KK7GWY & Claude (AI dev partner) |
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
This PR fixes the
Go to Frequencykeyboard shortcut flow so direct frequency entry reliably opens the active slice frequency editor and recenters the panadapter on the tuned frequency.Problem
Binding
Go to Frequencyto a key such asGwas inconsistent in three ways:autopan=0, so the panadapter could stay offset and leave the tuned frequency off screenWhat Changed
MainWindow::registerShortcutActions()now resolves the active slice first, then looks up that slices VFO widget from the owning spectrum before callingbeginDirectEntry()VfoWidget::beginDirectEntry()now switches to the inline editor, raises the widget, sets focus withQt::ShortcutFocusReason, and reasserts that focus on the next event-loop tick withQTimer::singleShot(0, ...)VfoWidgetandRxAppletnow usesSliceModel::tuneAndRecenter()instead ofsetFrequency()so the pan follows the tuned slice and keeps the destination frequency visibleWhy This Is Safe
tuneAndRecenter()is already an existing model API used elsewhere in the app for recentering workflows, so this change aligns manual frequency entry with established tuning behavior instead of introducing a new command pathmainand contains only the three files involved in the frequency-entry flowValidation
main-based worktree withcmake -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/qtcmake --build build -j8