Skip to content

Commit

Permalink
fix #269378 Double Coda leads to not detecting 'final' playthrough af…
Browse files Browse the repository at this point in the history
…ter 2nd jump rewind logic
  • Loading branch information
jeetee authored and lasconic committed Feb 16, 2018
1 parent 40c97ee commit 1d3a9d3
Show file tree
Hide file tree
Showing 3 changed files with 774 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libmscore/repeatlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,10 @@ void RepeatList::unwindSection(Measure* sectionStartMeasure, Measure* sectionEnd
for (Measure* m = _score->firstMeasure(); m; m = m->nextMeasure())
m->setPlaybackCount(0);
}
else { // set each measure to have it play it's final time, but only from our jumptarget on until the current measure
for (Measure* m = jumpToMeasure; (m && (m != currentMeasure->nextMeasure())); m = m->nextMeasure()) {
else { // set each measure to have it play its final time
// but only from our jumptarget on until the playUntil/current measure (whichever comes first)
Measure* const rewindUntil = (playUntilMeasure->no() < currentMeasure->no()) ? playUntilMeasure->nextMeasure() : currentMeasure->nextMeasure();
for (Measure* m = jumpToMeasure; (m && (m != rewindUntil)); m = m->nextMeasure()) {
if (m->playbackCount() != 0)
m->setPlaybackCount(m->playbackCount() - 1);
}
Expand Down
Loading

0 comments on commit 1d3a9d3

Please sign in to comment.