Mercurial > hg > svgui
diff layer/WaveformLayer.cpp @ 1341:ab2cafd3a7cb zoom
Fixes for TimeRuler spacing and for the boundaries of the WaveformLayer paint area
author | Chris Cannam |
---|---|
date | Thu, 27 Sep 2018 15:20:25 +0100 |
parents | fc3c9971a43a |
children | 5f3e374746b6 |
line wrap: on
line diff
--- a/layer/WaveformLayer.cpp Wed Sep 26 13:03:16 2018 +0100 +++ b/layer/WaveformLayer.cpp Thu Sep 27 15:20:25 2018 +0100 @@ -427,11 +427,14 @@ f0 = f0 / modelZoomLevel; f0 = f0 * modelZoomLevel; - viewFrame = v->getFrameForX(x + 1); - - f1 = viewFrame; - f1 = f1 / modelZoomLevel; - f1 = f1 * modelZoomLevel; + if (v->getZoomLevel().zone == ZoomLevel::PixelsPerFrame) { + f1 = f0 + 1; + } else { + viewFrame = v->getFrameForX(x + 1); + f1 = viewFrame; + f1 = f1 / modelZoomLevel; + f1 = f1 * modelZoomLevel; + } return (f0 < m_model->getEndFrame()); }