Skip to content

Commit

Permalink
fix #286185: bends above the staff drawn incorrectly
Browse files Browse the repository at this point in the history
The original impelementation of bends was for tablature only
and had no need to handle notes above the staff.
Eventually standard staves were supported,
but no allowances were made for notes above the staff.
This changes simply adjusts the vertical position of the bend
to be as high above notes above the staff
as they are notes on the top line.
It's just a matter of forcing the notePos (used in both layout and drawing)
to be no less than zero.
  • Loading branch information
MarcSabatella committed Oct 8, 2019
1 parent ad7bd1a commit f53c93d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libmscore/bend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ void Bend::layout()
}
else {
notePos = note->pos();
notePos.ry() = qMax(notePos.y(), 0.0);
noteWidth = note->width();
}
QRectF bb;
Expand Down

0 comments on commit f53c93d

Please sign in to comment.