Skip to content

Commit

Permalink
Fix #326130, GH#9041: Make member _magx depending on number of spanne…
Browse files Browse the repository at this point in the history
…d staves only.

Backport of musescore#9903
  • Loading branch information
njvdberg authored and Jojo-Schmitz committed Dec 8, 2021
1 parent f215acd commit 8d4f7ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libmscore/bracket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@ void Bracket::setStaffSpan(int a, int b)

if (score()->styleSt(Sid::MusicalSymbolFont) == "Leland")
v = qMin(4, v);
// total default height of a system of n staves / height of a 5 line staff
qreal dist = score()->enableVerticalSpread() ? score()->styleS(Sid::maxAkkoladeDistance).val() : score()->styleS(Sid::akkoladeDistance).val();
_magx = v + ((v - 1) * dist / 4.0);

// 1.125 is a "magic" number based on akkoladeDistance/4.0 (default value 6.5).
_magx = v + ((v - 1) * 1.125);

if (v == 1)
_braceSymbol = SymId::braceSmall;
else if (v <= 2)
Expand Down

0 comments on commit 8d4f7ee

Please sign in to comment.