Skip to content

Commit

Permalink
Merge pull request #6151 from IsaacWeiss/306092-bracket-selection
Browse files Browse the repository at this point in the history
Fix #306092: Adding bracket when nothing selected sets its span to 0
  • Loading branch information
anatoly-os authored May 31, 2020
2 parents 9ad77a4 + 73b6353 commit 5594208
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libmscore/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,10 @@ Element* Measure::drop(EditData& data)
firstStaff++;
}
Selection sel = score()->selection();
score()->undoAddBracket(staff, level, b->bracketType(), sel.staffEnd() - sel.staffStart());
if (sel.isRange())
score()->undoAddBracket(staff, level, b->bracketType(), sel.staffEnd() - sel.staffStart());
else
score()->undoAddBracket(staff, level, b->bracketType(), 1);
delete b;
}
break;
Expand Down

0 comments on commit 5594208

Please sign in to comment.