Mercurial > hg > svgui
comparison layer/TimeInstantLayer.cpp @ 16:02a718909b2d
* Fixes to playback of short looped files, of synthesised content within looped
sections, and a few other fixes
author | Chris Cannam |
---|---|
date | Thu, 26 Jan 2006 11:56:09 +0000 |
parents | 01849cd277e6 |
children | 0183ebb725ca |
comparison
equal
deleted
inserted
replaced
15:4d5d9aba406b | 16:02a718909b2d |
---|---|
295 i != points.end(); ++i) { | 295 i != points.end(); ++i) { |
296 | 296 |
297 const SparseOneDimensionalModel::Point &p(*i); | 297 const SparseOneDimensionalModel::Point &p(*i); |
298 | 298 |
299 int x = (p.frame - startFrame) / zoomLevel; | 299 int x = (p.frame - startFrame) / zoomLevel; |
300 int w = m_model->getResolution() / zoomLevel; | 300 float w = float(m_model->getResolution()) / zoomLevel; |
301 | 301 int iw = w; |
302 if (w < 1) w = 1; | 302 if (iw < 2) { |
303 if (w < 0.5) iw = 1; | |
304 else iw = 2; | |
305 } | |
306 | |
303 if (p.frame == illuminateFrame) { | 307 if (p.frame == illuminateFrame) { |
304 paint.setPen(Qt::black); //!!! | 308 paint.setPen(Qt::black); //!!! |
305 } else { | 309 } else { |
306 paint.setPen(brushColour); | 310 paint.setPen(brushColour); |
307 } | 311 } |
308 paint.drawRect(x, 0, w - 1, m_view->height() - 1); | 312 paint.drawRect(x, 0, iw - 1, m_view->height() - 1); |
309 paint.setPen(m_colour); | 313 paint.setPen(m_colour); |
310 | 314 |
311 if (p.label != "") { | 315 if (p.label != "") { |
312 | 316 |
313 // only draw if there's enough room from here to the next point | 317 // only draw if there's enough room from here to the next point |