Skip to content

Commit

Permalink
Merge pull request #5741 from mattmcclinch/301414-paste-tie
Browse files Browse the repository at this point in the history
fix #301414: Corrupt tie created on paste of tied note that requires additional tie
  • Loading branch information
dmitrio95 committed Feb 27, 2020
2 parents ed32c5b + 2341f81 commit 43573a9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libmscore/note.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1432,10 +1432,13 @@ void Note::readAddConnector(ConnectorInfoReader* info, bool pasteMode)
sp->setTrack(l.track());
sp->setTick(tick());
if (sp->isTie()) {
Note* n = this;
while (n->tieFor())
n = n->tieFor()->endNote();
Tie* tie = toTie(sp);
tie->setParent(this);
tie->setStartNote(this);
_tieFor = tie;
tie->setParent(n);
tie->setStartNote(n);
n->_tieFor = tie;
}
else {
sp->setAnchor(Spanner::Anchor::NOTE);
Expand Down

0 comments on commit 43573a9

Please sign in to comment.