Skip to content

Commit

Permalink
fix #103176: correct length of volta with mmrests enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Homlet committed Mar 23, 2016
1 parent 390bd8f commit 4ea25cd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions libmscore/line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,23 +693,23 @@ QPointF SLine::linePos(Grip grip, System** sys) const
else {
qreal _spatium = spatium();

m = endMeasure();
if (score()->styleB(StyleIdx::createMultiMeasureRests)) {
// find the actual measure where the volta should stop
m = startMeasure();
if (m->hasMMRest())
m = m->mmRest();
while (m->nextMeasureMM() && (m->endTick() < tick2()))
m = m->nextMeasureMM();
}
else {
m = endMeasure();
}
// back up to barline (skip courtesy elements)
Segment* seg = m->last();
while (seg && seg->segmentType() != Segment::Type::EndBarLine)
seg = seg->prev();
qreal mwidth = seg ? seg->x() : m->bbox().right();
x = m->pos().x() + mwidth;
if (score()->styleB(StyleIdx::createMultiMeasureRests)) {
//find the actual measure where the volta should stop
Measure* sm = startMeasure();
Measure* m = sm;
if (sm->hasMMRest())
m = sm->mmRest();
while (m->nextMeasureMM() && (m->endTick() < tick2()))
m = m->nextMeasureMM();
x = m->pos().x() + m->bbox().right();
}
// align to barline
if (seg && seg->segmentType() == Segment::Type::EndBarLine) {
Element* e = seg->element(0);
Expand Down

0 comments on commit 4ea25cd

Please sign in to comment.