Mercurial > hg > svgui
diff layer/SpectrogramLayer.cpp @ 136:a859b87162ca
* beginnings of drag up/down in layers as appropriate
author | Chris Cannam |
---|---|
date | Mon, 21 Aug 2006 16:26:35 +0000 |
parents | e98130764635 |
children | 10a82b2bbb8b |
line wrap: on
line diff
--- a/layer/SpectrogramLayer.cpp Mon Aug 21 13:18:50 2006 +0000 +++ b/layer/SpectrogramLayer.cpp Mon Aug 21 16:26:35 2006 +0000 @@ -2787,10 +2787,12 @@ int n = 0; defaultStep = 0; + bool haveDefault = false; float s2 = sqrtf(sqrtf(2)); while (dist > min) { - if (max >= m_initialMaxFrequency) { + if (!haveDefault && max <= m_initialMaxFrequency) { defaultStep = n; + haveDefault = true; } ++n; dist /= s2;