Skip to content

Commit

Permalink
Merge pull request #5140 from MarcSabatella/21131-ledger-line-size
Browse files Browse the repository at this point in the history
fix #21131: bad ledger line size with small notes
  • Loading branch information
dmitrio95 committed Jun 20, 2019
2 parents fbfd693 + 3b66ed7 commit 50e4e7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libmscore/chord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ void Chord::addLedgerLines()

// the extra length of a ledger line with respect to notehead (half of it on each side)
qreal extraLen = score()->styleP(Sid::ledgerLineLength) * mag * 0.5;
qreal hw = _notes[0]->headWidth();
qreal hw;
qreal minX, maxX; // note extrema in raster units
int minLine, maxLine;
bool visible = false;
Expand All @@ -706,6 +706,7 @@ void Chord::addLedgerLines()
for (size_t j = 0; j < 2; j++) { // notes are scanned twice...
int from, delta;
vector<LedgerLineData> vecLines;
hw = 0.0;
minX = maxX = 0;
minLine = 0;
maxLine = lineBelow;
Expand All @@ -732,6 +733,7 @@ void Chord::addLedgerLines()

if (note->visible()) // if one note is visible,
visible = true; // all lines between it and the staff are visible
hw = qMax(hw, note->headWidth());

//
// Experimental:
Expand Down

0 comments on commit 50e4e7d

Please sign in to comment.