Skip to content

Commit

Permalink
fix #224031: record adding measure elements to undo stack on creating…
Browse files Browse the repository at this point in the history
… MM rests
  • Loading branch information
dmitrio95 committed Dec 1, 2018
1 parent 1b1912d commit 6118f88
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1787,8 +1787,11 @@ void Score::createMMRest(Measure* m, Measure* lm, const Fraction& len)
break;
}
}
if (!found)
mmr->add(e->clone());
if (!found) {
Element* e1 = e->clone();
e1->setParent(mmr);
undo(new AddElement(e1));
}
}
for (Element* e : oldList)
delete e;
Expand Down

0 comments on commit 6118f88

Please sign in to comment.