Skip to content

Commit

Permalink
Fix GH#9020, fix #322436: Select correct brace symbol for each system…
Browse files Browse the repository at this point in the history
… independently

Backport of  musescore#9086, fixes musescore#9020
  • Loading branch information
Nick-Mazuk authored and Jojo-Schmitz committed May 12, 2022
1 parent fe07428 commit 5ff136b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libmscore/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,19 +549,21 @@ Bracket* System::createBracket(Ms::BracketItem* bi, int column, int staffIdx, QL
lastStaff = nstaves - 1;

for (; firstStaff <= lastStaff; ++firstStaff) {
if (score()->staff(firstStaff)->show())
if (staff(firstStaff)->show())
break;
}
for (; lastStaff >= firstStaff; --lastStaff) {
if (score()->staff(lastStaff)->show())
if (staff(lastStaff)->show())
break;
}
int span = lastStaff - firstStaff + 1;
//
// do not show bracket if it only spans one
// system due to some invisible staves
//
if ((span > 1) || (bi->bracketSpan() == span)) {
if ((span > 1)
|| (bi->bracketSpan() == span)
|| (span == 1 && score()->styleB(Sid::alwaysShowBracketsWhenEmptyStavesAreHidden))) {
//
// this bracket is visible
//
Expand Down

0 comments on commit 5ff136b

Please sign in to comment.