diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2015-06-22 07:12:01 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2015-06-22 07:12:01 -0700 |
commit | 30d2f0d6af2a9e21040e9526f6238e32536d873c (patch) | |
tree | d19291461fc34503ee3dd8fab981b865144029c9 | |
parent | 060afcdfd7bea70804380c6d53b42768421db993 (diff) | |
parent | c7d9bd3297f58f40c597f5beee8ca67f8f556290 (diff) |
Merge remote-tracking branch 'tom/qtgui/cpfix' into maint
-rw-r--r-- | gr-qtgui/lib/freqcontrolpanel.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gr-qtgui/lib/freqcontrolpanel.cc b/gr-qtgui/lib/freqcontrolpanel.cc index 269b88a23d..5840989949 100644 --- a/gr-qtgui/lib/freqcontrolpanel.cc +++ b/gr-qtgui/lib/freqcontrolpanel.cc @@ -21,6 +21,7 @@ */ #include <gnuradio/qtgui/freqcontrolpanel.h> +#include <cmath> FreqControlPanel::FreqControlPanel(FreqDisplayForm *form) : QVBoxLayout(), @@ -245,7 +246,7 @@ FreqControlPanel::notifyAvgSlider(int val) void FreqControlPanel::toggleFFTSize(int val) { - int index = static_cast<int>(logf(static_cast<float>(val))/logf(2.0f)) - 5; + int index = static_cast<int>(round(logf(static_cast<float>(val))/logf(2.0f))) - 5; d_fft_size_combo->setCurrentIndex(index); } |