fix #40301: ties can overlap staff lines
This commit is contained in:
parent
9b2266e77d
commit
83e26d87e7
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue