# HG changeset patch # User Chris Cannam # Date 1138276569 0 # Node ID 02a718909b2de31f27c66ca912a63669cdb41846 # Parent 4d5d9aba406b82dbf2e15741e006866aece28e37 * Fixes to playback of short looped files, of synthesised content within looped sections, and a few other fixes diff -r 4d5d9aba406b -r 02a718909b2d layer/TimeInstantLayer.cpp --- a/layer/TimeInstantLayer.cpp Wed Jan 25 17:46:28 2006 +0000 +++ b/layer/TimeInstantLayer.cpp Thu Jan 26 11:56:09 2006 +0000 @@ -297,15 +297,19 @@ const SparseOneDimensionalModel::Point &p(*i); int x = (p.frame - startFrame) / zoomLevel; - int w = m_model->getResolution() / zoomLevel; + float w = float(m_model->getResolution()) / zoomLevel; + int iw = w; + if (iw < 2) { + if (w < 0.5) iw = 1; + else iw = 2; + } - if (w < 1) w = 1; if (p.frame == illuminateFrame) { paint.setPen(Qt::black); //!!! } else { paint.setPen(brushColour); } - paint.drawRect(x, 0, w - 1, m_view->height() - 1); + paint.drawRect(x, 0, iw - 1, m_view->height() - 1); paint.setPen(m_colour); if (p.label != "") {