1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-10 21:43:31 -04:00

Merge pull request #2860 from rgetz/rgetz-fix-invalidFunctionArg

gui: Explicitly call QSlider::setRange in LogSlider constructor
This commit is contained in:
Edouard Griffiths
2026-08-01 14:11:21 +02:00
committed by GitHub
2 changed files with 9 additions and 4 deletions
+8 -3
View File
@@ -161,9 +161,14 @@ void FFTNRDialog::setAlpha(float alpha, int fftLength, int sampleRate)
ui->alpha->blockSignals(false);
ui->alphaValue->setText(tr("%1").arg(alphaDisplay));
ui->alphaValue->setToolTip(tr("dB(1 - alpha) alpha=%1").arg(m_alpha, 0, 'f', 5));
float t = m_flen;
t /= m_sampleRate;
float tau = -(t / log(m_alpha));
float t = static_cast<float>(m_flen) / m_sampleRate;
float tau = 0.0f;
if (m_alpha > 0.0f)
{
tau = -(t / std::log(m_alpha));
}
ui->tauText->setText(tr("%1").arg(tau, 0, 'f', 3));
}
+1 -1
View File
@@ -30,7 +30,7 @@
LogSlider::LogSlider(QWidget *parent) :
QSlider(Qt::Horizontal, parent)
{
setRange(0, 1000);
QSlider::setRange(0, 1000);
connect(this, &QSlider::valueChanged, this, &LogSlider::handleValueChanged);
setPageStep(1);
setTickPosition(QSlider::TicksAbove);