Skip to content

Commit

Permalink
fix #40146: Crash on changing rest duration
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Dec 5, 2014
1 parent 0932844 commit 28fdd98
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,9 +981,11 @@ qDebug(" +ChangeCRLen::setRest %d/%d", f2.numerator(), f2.denominator());
if (first) {
QList<TDuration> dList = toDurationList(f2, true);
undoChangeChordRestLen(cr, dList[0]);
if(dList.size() > 1) {
TDuration remain = TDuration(f2) - dList[0];
setRest(tick +dList[0].ticks(), track, remain.fraction() * timeStretch, (remain.dots() > 0), tuplet);
int tick2 = cr->tick();
for (int i = 1; i < dList.size(); ++i) {
tick2 += dList[i-1].ticks();
TDuration d = dList[i];
setRest(tick2, track, d.fraction() * timeStretch, (d.dots() > 0), tuplet);
}
}
else {
Expand Down

0 comments on commit 28fdd98

Please sign in to comment.