Skip to content

Commit

Permalink
Merge pull request #3525 from lasconic/fix-270136_2.2
Browse files Browse the repository at this point in the history
fix #270136: Regression 2.2: File with MMRest and vertical frame crea…
  • Loading branch information
lasconic authored Mar 8, 2018
2 parents e37f251 + dd9e1e3 commit 5f6b17b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1870,8 +1870,9 @@ void Score::createMMRests()
// create mm rest measures
//
for (Measure* m = firstMeasure(); m; m = m->nextMeasure()) {
MeasureBase* nmb = m;
Measure* nm = m;
Measure* lm = nm;
Measure* lm = m;
int n = 0;
Fraction len;
while (validMMRestMeasure(nm)) {
Expand All @@ -1882,11 +1883,10 @@ void Score::createMMRests()
++n;
len += nm->len();
lm = nm;
if (!mb || (mb->type() != Element::Type::MEASURE)) {
nm = nullptr;
nmb = mb;
if (!mb || (mb->type() != Element::Type::MEASURE))
break;
}
nm = static_cast<Measure*>(mb);
nm = static_cast<Measure*>(nmb);
}

if (n >= styleI(StyleIdx::minEmptyMeasures)) {
Expand Down Expand Up @@ -2091,7 +2091,7 @@ void Score::createMMRests()
undo(new RemoveElement(e));
}

mmr->setNext(nm);
mmr->setNext(nmb);
mmr->setPrev(m->prev());
m = lm;
}
Expand Down

0 comments on commit 5f6b17b

Please sign in to comment.