Skip to content

Commit

Permalink
fix #167416: cut a measure with tuplet causes crash. Trying to not re…
Browse files Browse the repository at this point in the history
…open # #29796
  • Loading branch information
lasconic committed Feb 21, 2017
1 parent 8620022 commit 82110fc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2269,22 +2269,22 @@ void Score::cmdDeleteSelection()
}
}
if (f.isValid() && !f.isZero()) {
fullMeasure = false; // HACK

if (fullMeasure) {
// handle this as special case to be able to
// fix broken measures:

// ws: does not work as TimeSig may be already removed
for (Measure* m = s1->measure(); m; m = m->nextMeasure()) {
Staff* staff = Score::staff(track / VOICES);
int tick = m->tick();
Fraction f = staff->timeSig(tick)->sig();
Rest* r = setRest(tick, track, f, false, 0);
if (!cr)
cr = r;
if (s2 && (m == s2->measure()))
break;
TimeSig* ts = staff->timeSig(tick);
if (ts) {
Fraction f = ts->sig();
Rest* r = setRest(tick, track, f, false, 0);
if (!cr)
cr = r;
if (s2 && (m == s2->measure()))
break;
}
}
}
else {
Expand Down

0 comments on commit 82110fc

Please sign in to comment.