Mercurial > hg > svgui
diff layer/WaveformLayer.cpp @ 362:a9dfa2d6d5ac
* Add pitch range in octaves, semitones and cents to the measurement rect
as well as in Hz
* Avoid crash when adding time ruler
This commit contains a lot of debug output (will be slow)
author | Chris Cannam |
---|---|
date | Wed, 06 Feb 2008 16:21:29 +0000 |
parents | 2f83b6e3b8ca |
children | 26ce2fb7bcbf |
line wrap: on
line diff
--- a/layer/WaveformLayer.cpp Wed Feb 06 14:25:46 2008 +0000 +++ b/layer/WaveformLayer.cpp Wed Feb 06 16:21:29 2008 +0000 @@ -664,8 +664,13 @@ if (int(modelZoomLevel) != zoomLevel) { + std::cerr << "WaveformLayer::paint: zoom level " << zoomLevel << " differs from model zoom level " << modelZoomLevel << std::endl; + std::cerr << "index from " << index; + index = size_t((double(index) * zoomLevel) / modelZoomLevel); + std::cerr << " to " << index << std::endl; + if (int(modelZoomLevel) < zoomLevel) { // Peaks may be missed! The model should avoid // this by rounding zoom levels up rather than @@ -675,6 +680,8 @@ maxIndex = size_t((double(index + 1) * zoomLevel) / modelZoomLevel) - 1; } + + std::cerr << "maxIndex = " << maxIndex << std::endl; } if (ranges && index < ranges->size()) {