Mercurial > hg > svgui
comparison layer/TimeInstantLayer.cpp @ 79:19bf27e4fb29
* Replace crash with warning when a transform could not be automatically
re-run
* More sensible default paths for Vamp plugin lookup (at least on Linux and
OS/X)
* A start to making the y coords for time value layers etc align
* Set sensible y coords for text labels in time instant and value layers
author | Chris Cannam |
---|---|
date | Thu, 13 Apr 2006 18:29:10 +0000 |
parents | 45ba0b381c5d |
children | 4b98bda7e94d |
comparison
equal
deleted
inserted
replaced
78:967193b6c7aa | 79:19bf27e4fb29 |
---|---|
383 getLocalPoints(v, localPos.x()); | 383 getLocalPoints(v, localPos.x()); |
384 if (!localPoints.empty()) illuminateFrame = localPoints.begin()->frame; | 384 if (!localPoints.empty()) illuminateFrame = localPoints.begin()->frame; |
385 } | 385 } |
386 | 386 |
387 int prevX = -1; | 387 int prevX = -1; |
388 | 388 int textY = v->getTextLabelHeight(this, paint); |
389 | |
389 for (SparseOneDimensionalModel::PointList::const_iterator i = points.begin(); | 390 for (SparseOneDimensionalModel::PointList::const_iterator i = points.begin(); |
390 i != points.end(); ++i) { | 391 i != points.end(); ++i) { |
391 | 392 |
392 const SparseOneDimensionalModel::Point &p(*i); | 393 const SparseOneDimensionalModel::Point &p(*i); |
393 SparseOneDimensionalModel::PointList::const_iterator j = i; | 394 SparseOneDimensionalModel::PointList::const_iterator j = i; |
461 int nx = v->getXForFrame(j->frame); | 462 int nx = v->getXForFrame(j->frame); |
462 if (nx >= x && nx - x - iw - 3 <= lw) good = false; | 463 if (nx >= x && nx - x - iw - 3 <= lw) good = false; |
463 } | 464 } |
464 | 465 |
465 if (good) { | 466 if (good) { |
466 paint.drawText(x + iw + 2, | 467 paint.drawText(x + iw + 2, textY, p.label); |
467 v->height() - paint.fontMetrics().height(), | |
468 p.label); | |
469 } | 468 } |
470 } | 469 } |
471 | 470 |
472 prevX = x; | 471 prevX = x; |
473 } | 472 } |