mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-27 06:38:44 -05:00
Draw correct scale on startup, with nbpp>1.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2662 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
19cd8750f1
commit
64bfbf3647
@ -1,4 +1,4 @@
|
||||
//-------------------------------------------------------------- MainWindow
|
||||
//--------------------------------------------------------------- MainWindow
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "devsetup.h"
|
||||
|
@ -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()
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user