diff --git a/mainwindow.cpp b/mainwindow.cpp
index feade7a..83fe0a8 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -4410,8 +4410,11 @@ bool MainWindow::decodeProcessQueue(qint32 *pSubmode){
dec_data.params.nfb=m_wideGraph->Fmax();
if(m_wideGraph->filterEnabled()){
- dec_data.params.nfa=max(0, m_wideGraph->filterMinimum());
- dec_data.params.nfb=min(m_wideGraph->filterMaximum(), 5000);
+ int low = max(0, m_wideGraph->filterMinimum());
+ int high = min(m_wideGraph->filterMaximum(), 5000);
+
+ dec_data.params.nfa=min(low, high);
+ dec_data.params.nfb=max(low, high);
}
//if(m_mode=="FT8" and m_config.bHound() and !ui->cbRxAll->isChecked()) dec_data.params.nfb=1000;
@@ -7543,6 +7546,8 @@ void MainWindow::on_actionJS8_triggered()
m_wideGraph->setSubMode(m_nSubMode);
#if JS8_ENFORCE_MINIMUM_FILTER_BANDWIDTH
m_wideGraph->setFilterMinimumBandwidth(computeBandwidthForSubmode(m_nSubMode) + 2*rxThreshold(m_nSubMode));
+#else
+ m_wideGraph->setFilterMinimumBandwidth(1);
#endif
bool bVHF=m_config.enable_VHF_features();
diff --git a/widegraph.cpp b/widegraph.cpp
index 17d710e..679c90f 100644
--- a/widegraph.cpp
+++ b/widegraph.cpp
@@ -403,12 +403,10 @@ void WideGraph::setFilter(int a, int b){
int low = std::min(a, b);
int high = std::max(a, b);
-#if JS8_ENFORCE_MINIMUM_FILTER_BANDWIDTH
// ensure minimum filter width
if(high-low < m_filterMinWidth){
high = low + m_filterMinWidth;
}
-#endif
int width = high - low;
int center = low + width / 2;
@@ -740,11 +738,11 @@ void WideGraph::on_sbPercent2dPlot_valueChanged(int n)
}
void WideGraph::on_filterMinSpinBox_valueChanged(int n){
- setFilter(n, m_filterMaximum);
+ setFilter(n, std::max(m_filterMaximum, n));
}
void WideGraph::on_filterMaxSpinBox_valueChanged(int n){
- setFilter(m_filterMinimum, n);
+ setFilter(std::min(m_filterMinimum, n), n);
}
void WideGraph::on_filterCenterSpinBox_valueChanged(int n){
diff --git a/widegraph.ui b/widegraph.ui
index 17aa91b..a17b16e 100644
--- a/widegraph.ui
+++ b/widegraph.ui
@@ -172,7 +172,7 @@
0
- -196
+ -195
267
402
@@ -269,6 +269,53 @@
+ -
+
+
+ false
+
+
+ QAbstractSpinBox::PlusMinus
+
+
+ Hz
+
+
+ Center:
+
+
+ 5000
+
+
+ 1
+
+
+ 1500
+
+
+
+ -
+
+
+ false
+
+
+ QAbstractSpinBox::PlusMinus
+
+
+ Hz
+
+
+ Width:
+
+
+ 5000
+
+
+ 2000
+
+
+
-
@@ -325,47 +372,6 @@
- -
-
-
- false
-
-
- Hz
-
-
- Center:
-
-
- 5000
-
-
- 1
-
-
- 1500
-
-
-
- -
-
-
- false
-
-
- Hz
-
-
- Width:
-
-
- 5000
-
-
- 1000
-
-
-