Skip to content

Commit

Permalink
fix #66076: tie not linked when adding note too long for measure
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella authored and lasconic committed Jun 22, 2015
1 parent dc1c677 commit acb7f42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ Segment* Score::setNoteRest(Segment* segment, int track, NoteVal nval, Fraction

ChordRest* ncr;
Note* note = 0;
Tie* addTie = 0;
if (nval.pitch == -1) {
nr = ncr = new Rest(this);
nr->setTrack(track);
Expand All @@ -537,6 +538,7 @@ Segment* Score::setNoteRest(Segment* segment, int track, NoteVal nval, Fraction
if (tie) {
tie->setEndNote(note);
note->setTieBack(tie);
addTie = tie;
}
Chord* chord = new Chord(this);
chord->setTrack(track);
Expand All @@ -555,6 +557,8 @@ Segment* Score::setNoteRest(Segment* segment, int track, NoteVal nval, Fraction
}
ncr->setTuplet(cr ? cr->tuplet() : 0);
undoAddCR(ncr, measure, tick);
if (addTie)
undoAddElement(addTie);
_playNote = true;
segment = ncr->segment();
tick += ncr->actualTicks();
Expand Down

0 comments on commit acb7f42

Please sign in to comment.