Skip to content

Commit 61251e9

Browse files
ten9876claude
andcommitted
Fix VFO filter label showing edge value instead of width (#1225)
VFO header showed abs(filterLow) for LSB and filterHigh for USB — the filter edge, not the passband width. This disagreed with the filter preset buttons by ~100 Hz. Now always shows filterHigh - filterLow to match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7ba5e54 commit 61251e9

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/gui/VfoWidget.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2784,14 +2784,10 @@ void VfoWidget::updateFreqLabel()
27842784
void VfoWidget::updateFilterLabel()
27852785
{
27862786
if (!m_slice) return;
2787-
const QString& mode = m_slice->mode();
2788-
int w;
2789-
if (mode == "USB" || mode == "FDV")
2790-
w = m_slice->filterHigh();
2791-
else if (mode == "LSB")
2792-
w = std::abs(m_slice->filterLow());
2793-
else
2794-
w = m_slice->filterHigh() - m_slice->filterLow();
2787+
// Always show the filter width (hi - lo), matching the filter preset
2788+
// buttons. Previously showed the edge value for USB/LSB, which
2789+
// disagreed with the highlighted button by ~100 Hz (#1225).
2790+
int w = m_slice->filterHigh() - m_slice->filterLow();
27952791
if (w >= 1000)
27962792
m_filterWidthLbl->setText(QString("%1K").arg(w / 1000.0, 0, 'f', 1));
27972793
else

0 commit comments

Comments
 (0)