Skip to content

Commit

Permalink
Fix bug in musescore#9086, inner hidden staves affect bracket span
Browse files Browse the repository at this point in the history
Backport of musescore#9140, follow up for musescore#9086
  • Loading branch information
Nick-Mazuk authored and Jojo-Schmitz committed Sep 16, 2021
1 parent e4f1e1d commit 4b403fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libmscore/bracket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ void Bracket::setStaffSpan(int a, int b)
score()->styleSt(Sid::MusicalSymbolFont) != "Emmentaler" && score()->styleSt(Sid::MusicalSymbolFont) != "Gonville")
{
int v = _lastStaff - _firstStaff + 1;

// if staves inner staves are hidden, decrease span
for (int staffIndex = _firstStaff; staffIndex <= _lastStaff; ++staffIndex) {
if (system() && !system()->staff(staffIndex)->show())
--v;
}

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
Expand Down

0 comments on commit 4b403fe

Please sign in to comment.