fix #40301: ties can overlap staff lines

This commit is contained in:
Marc Sabatella 2014-11-29 20:55:51 -07:00
parent 9b2266e77d
commit 83e26d87e7

View file

@ -619,10 +619,9 @@ void SlurSegment::layout(const QPointF& p1, const QPointF& p2)
if (bbox.height() < minDistance * 2 * sp && st) {
// slur/tie is fairly flat
bool up = slurTie()->up();
qreal staffY = system()->staff(staffIdx())->y();
qreal ld = st->lineDistance() * sp;
qreal topY = (bbox.top() - staffY) / ld;
qreal bottomY = (bbox.bottom() - staffY) / ld;
qreal topY = bbox.top() / ld;
qreal bottomY = bbox.bottom() / ld;
int lineY = up ? qRound(topY) : qRound(bottomY);
if (lineY >= 0 && lineY < st->lines() * st->lineDistance()) {
// on staff