Skip to content

Commit a400b63

Browse files
authored
Merge pull request #30771 from mike-spa/fixMeasureNumberCollidesWithBracket
Fix measure number collides with bracket
2 parents d21fa75 + a848ac4 commit a400b63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/engraving/rendering/score/measurenumberlayout.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ void MeasureNumberLayout::layoutMeasureNumberBase(MeasureNumberBase* item, Measu
136136
double yoff = 0.0;
137137

138138
// If there is only one line, the barline spans outside the staff lines, so the default position is not correct.
139-
if (item->staff()->constStaffType(item->measure()->tick())->lines() == 1) {
139+
staff_idx_t effectiveStaffIdx = item->effectiveStaffIdx();
140+
Staff* staff = item->score()->staff(effectiveStaffIdx);
141+
if (staff && staff->lines(item->tick()) == 1) {
140142
yoff -= 2.0 * item->spatium();
141143
}
142144

0 commit comments

Comments
 (0)