Skip to content

Commit

Permalink
Correct cloning of tuplets
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-spa committed Aug 16, 2023
1 parent 5ddd7e1 commit 6c3ee6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engraving/libmscore/edit.cpp
Expand Up @@ -6410,11 +6410,11 @@ void Score::undoAddCR(ChordRest* cr, Measure* measure, const Fraction& tick)
DurationElement* elementBelow = cr;
Tuplet* tupletAbove = elementBelow->tuplet();
while (tupletAbove) {
DurationElement* linkedElementBelow = (DurationElement*)elementBelow->findLinkedInScore(score);
DurationElement* linkedElementBelow = (DurationElement*)elementBelow->findLinkedInStaff(staff);
if (!linkedElementBelow) { // shouldn't happen
break;
}
Tuplet* linkedTuplet = (Tuplet*)tupletAbove->findLinkedInScore(score);
Tuplet* linkedTuplet = (Tuplet*)tupletAbove->findLinkedInStaff(staff);
if (!linkedTuplet) {
linkedTuplet = toTuplet(tupletAbove->linkedClone());
linkedTuplet->setScore(score);
Expand Down

0 comments on commit 6c3ee6f

Please sign in to comment.