Skip to content

Commit

Permalink
fix mm rest creation for parts
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Sep 20, 2013
1 parent 7769088 commit c84969b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,11 +924,22 @@ void Score::createMMRests()
// create a multi measure rest from m to lm (inclusive)
// attach the measure to m
//
printf("create mm rest %d %d\n", n, _showVBox);
Measure* mmr = m->mmRest() ? m->mmRest() : new Measure(this);
Measure* mmr;
if (m->mmRest()) {
mmr = m->mmRest();
if (m->len() != len) {
Segment* s = mmr->findSegment(Segment::SegEndBarLine, mmr->endTick());
mmr->setLen(len);
s->setTick(mmr->endTick());
}
}
else {
mmr = new Measure(this);
mmr->setLen(len);
}

mmr->setMMRestCount(n);
mmr->setTick(m->tick());
mmr->setLen(len);
mmr->setNo(m->no());
mmr->setEndBarLineType(lm->endBarLineType(), true, lm->endBarLineVisible(), lm->endBarLineColor());
Segment* s = mmr->getSegment(Segment::SegChordRest, m->tick());
Expand Down

0 comments on commit c84969b

Please sign in to comment.