# HG changeset patch # User Chris Cannam # Date 1444813979 -3600 # Node ID dc809248800511ef8e8c7501ace5a128a04d95df # Parent 8588b97f1d1c324a9d2c14e646b07fc00442172f# Parent 89f44d182d379d5555954093016d32948db16b53 Merge from branch "tony-2.0-integration" diff -r 8588b97f1d1c -r dc8092488005 layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Tue Aug 04 16:39:40 2015 +0100 +++ b/layer/SpectrogramLayer.cpp Wed Oct 14 10:12:59 2015 +0100 @@ -1512,7 +1512,7 @@ } if (m_fftModels[view]->getHeight() != fftSize / 2 + 1) { #ifdef DEBUG_SPECTROGRAM_REPAINT - cerr << "SpectrogramLayer::getFFTModel(" << v << "): Found a model with the wrong height (" << m_fftModels[view].first->getHeight() << ", wanted " << (fftSize / 2 + 1) << ")" << endl; + cerr << "SpectrogramLayer::getFFTModel(" << v << "): Found a model with the wrong height (" << m_fftModels[view]->getHeight() << ", wanted " << (fftSize / 2 + 1) << ")" << endl; #endif delete m_fftModels[view]; m_fftModels.erase(view); @@ -2571,7 +2571,7 @@ fft->getNormalizedMagnitudesAt(sx, autoarray, minbin, maxbin - minbin + 1); float max = fft->getMaximumMagnitudeAt(sx); float scale = log10f(max + 1.f); - cout << "sx = " << sx << ", max = " << max << ", log10(max) = " << log10(max) << ", scale = " << scale << endl; +// cout << "sx = " << sx << ", max = " << max << ", log10(max) = " << log10(max) << ", scale = " << scale << endl; for (int i = minbin; i <= maxbin; ++i) { autoarray[i - minbin] *= scale; } diff -r 8588b97f1d1c -r dc8092488005 view/ViewProxy.h --- a/view/ViewProxy.h Tue Aug 04 16:39:40 2015 +0100 +++ b/view/ViewProxy.h Wed Oct 14 10:12:59 2015 +0100 @@ -71,11 +71,11 @@ return m_view->getValueExtents(unit, min, max, log); } virtual int getZoomLevel() const { - //!!! aarg, what if it's already 1? int z = m_view->getZoomLevel(); - cerr << "getZoomLevel: from " << z << " to "; +// cerr << "getZoomLevel: from " << z << " to "; z = z / m_scaleFactor; - cerr << z << endl; +// cerr << z << endl; + if (z < 1) z = 1; return z; } virtual QRect getPaintRect() const {