Skip to content

Commit

Permalink
fix #68956: reducing span leaves one-line staff with no barlines
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Jul 14, 2015
1 parent 2c866f0 commit 8dcc5b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libmscore/barline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,13 @@ void BarLine::endEdit()
int idx1 = staffIdx() + _span;
int idx2 = staffIdx() + staff()->barLineSpan();
// set standard span for each no-longer-spanned staff
for (int idx = idx1; idx < idx2; ++idx)
score()->undoChangeBarLineSpan(score()->staff(idx), 1, 0, (score()->staff(idx)->lines()-1)*2);
for (int idx = idx1; idx < idx2; ++idx) {
Staff* staff = score()->staff(idx);
int lines = staff->lines();
int spanFrom = lines == 1 ? BARLINE_SPAN_1LINESTAFF_FROM : 0;
int spanTo = lines == 1 ? BARLINE_SPAN_1LINESTAFF_TO : (lines - 1) * 2;
score()->undoChangeBarLineSpan(staff, 1, spanFrom, spanTo);
}
}
}

Expand Down

0 comments on commit 8dcc5b6

Please sign in to comment.