diff --git a/mainwindow.cpp b/mainwindow.cpp index cc8131ff1..02dc35acc 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//-------------------------------------------------------------- MainWindow +//--------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h" diff --git a/plotter.cpp b/plotter.cpp index d489f3e2a..4471bbe6d 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -357,7 +357,7 @@ int CPlotter::XfromFreq(float f) //XfromFreq() float CPlotter::FreqfromX(int x) //FreqfromX() { - return float(1000.0 + m_fftBinWidth*x); + return float(1000.0 + x*m_binsPerPixel*m_fftBinWidth); } void CPlotter::SetRunningState(bool running) //SetRunningState() diff --git a/widegraph.cpp b/widegraph.cpp index 6925480cf..cdd0f88a2 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -43,6 +43,8 @@ WideGraph::WideGraph(QWidget *parent) : ui->widePlot->m_bCurrent=settings.value("Current",true).toBool(); ui->rbCurrent->setChecked(ui->widePlot->m_bCurrent); ui->rbCumulative->setChecked(!ui->widePlot->m_bCurrent); + int nbpp=settings.value("BinsPerPixel",1).toInt(); + ui->widePlot->setBinsPerPixel(nbpp); settings.endGroup(); } @@ -68,6 +70,7 @@ void WideGraph::saveSettings() settings.setValue("WaterfallAvg",ui->waterfallAvgSpinBox->value()); settings.setValue("DialFreqMHz",m_dialFreq); settings.setValue("Current",ui->widePlot->m_bCurrent); + settings.setValue("BinsPerPixel",ui->widePlot->binsPerPixel()); settings.endGroup(); }