Skip to content

Commit a848ac4

Browse files
committed
Fix measure number collides with bracket
Should use effectiveStaffIdx as opposed to checking its "original" staff because staves may be hidden in between.
1 parent c1199c7 commit a848ac4

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)