Bug Report
Description
Clicking 80m or 40m in the band selection menu sometimes tunes the radio to 20m (14.1 MHz) instead of the correct frequency (3.800 / 7.200 MHz).
Root Cause
The band-crossing detection in MainWindow fired on every frequencyChanged signal, including during initial connection when the radio reports slice frequencies via status messages. During connect, m_updatingFromModel was true but the band-crossing code didn't check it, causing it to:
- Detect a "band crossing" as the radio reported its current frequency
- Save the current state (14.1 MHz / 20m) under whatever band was momentarily detected
- Persist this incorrect state to QSettings
When the user later clicked 80m or 40m, band memory restored the stale 14.1 MHz state.
Fix
- Guard band-crossing detection with
if (!m_updatingFromModel) — don't save band state during model-driven frequency updates (initial connect, status pushes)
- One-time migration clears stale
bands group from QSettings on first launch of v0.2.3+
Files Changed
src/gui/MainWindow.cpp — band-crossing guard + migration
🤖 Generated with Claude Code
Bug Report
Description
Clicking 80m or 40m in the band selection menu sometimes tunes the radio to 20m (14.1 MHz) instead of the correct frequency (3.800 / 7.200 MHz).
Root Cause
The band-crossing detection in
MainWindowfired on everyfrequencyChangedsignal, including during initial connection when the radio reports slice frequencies via status messages. During connect,m_updatingFromModelwas true but the band-crossing code didn't check it, causing it to:When the user later clicked 80m or 40m, band memory restored the stale 14.1 MHz state.
Fix
if (!m_updatingFromModel)— don't save band state during model-driven frequency updates (initial connect, status pushes)bandsgroup from QSettings on first launch of v0.2.3+Files Changed
src/gui/MainWindow.cpp— band-crossing guard + migration🤖 Generated with Claude Code