Skip to content

Commit

Permalink
fix #57646: corruption on paste with segment annotation in voice > 0,…
Browse files Browse the repository at this point in the history
… see PR #1971
  • Loading branch information
lasconic committed Apr 29, 2015
1 parent 54bac67 commit 0fc9f17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libmscore/paste.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,10 @@ bool Score::pasteStaff(XmlReader& e, Segment* dst, int dstStaff)

// be sure to paste the element in the destination track;
// setting track needs to be repeated, as it might have been overwritten by el->read()
el->setTrack(e.track());
// preserve *voice* from source, though
el->setTrack((e.track() / VOICES) * VOICES + el->voice());

undoChangeElement(seg->element(e.track()), el);
undoAddElement(el);
}
else if (tag == "Clef") {
Clef* clef = new Clef(this);
Expand Down

0 comments on commit 0fc9f17

Please sign in to comment.