Skip to content

Commit

Permalink
fix #27646
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Jul 15, 2014
1 parent b408591 commit a4d6faa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libmscore/note.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,14 +1145,18 @@ void Note::endDrag()
}
else {
// on PITCHED / PERCUSSION staves, dragging a note changes the note pitch
int nLine = _line + _lineOffset;
int nLine = _line + _lineOffset;
_lineOffset = 0;
// get note context
int tick = chord()->tick();
ClefType clef = staff->clef(tick);
Key key = staff->key(tick);
// determine new pitch of dragged note
int nPitch = line2pitch(nLine, clef, key);
if (!concertPitch()) {
Interval interval = staff->part()->instr()->transpose();
nPitch += interval.chromatic;
}
int tpc1 = pitch2tpc(nPitch, key, Prefer::NEAREST);
int tpc2 = pitch2tpc(nPitch - transposition(), key, Prefer::NEAREST);
// undefined for non-tablature staves
Expand Down

0 comments on commit a4d6faa

Please sign in to comment.