Skip to content

Commit

Permalink
fix #12122: Tie over measure duration in note entry gives bad layoute…
Browse files Browse the repository at this point in the history
…d tie
  • Loading branch information
lasconic committed Aug 6, 2012
1 parent 04566b3 commit 8393042
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions libmscore/edit.cpp
Expand Up @@ -780,16 +780,20 @@ void Score::cmdAddTie()
bool addFlag = _is.cr()->type() == CHORD;
Note* n = addPitch(note->pitch(), addFlag);
if (n) {
n->setLine(note->line());
n->setTpc(note->tpc());
Tie* tie = new Tie(this);
tie->setStartNote(note);
tie->setEndNote(n);
tie->setTrack(note->track());
note->setTieFor(tie);
n->setTieBack(tie);
undoAddElement(tie);
nextInputPos(n->chord(), false);
// n is not necessarly next note if duration span over measure
Note* nnote = searchTieNote(note);
if (nnote) {
n->setLine(note->line());
n->setTpc(note->tpc());
Tie* tie = new Tie(this);
tie->setStartNote(note);
tie->setEndNote(nnote);
tie->setTrack(note->track());
note->setTieFor(tie);
nnote->setTieBack(tie);
undoAddElement(tie);
nextInputPos(n->chord(), false);
}
}
continue;
}
Expand Down

0 comments on commit 8393042

Please sign in to comment.