13
0

Fix snap of note drags when the region position is not itself snapped to the grid (#4322).

git-svn-id: svn://localhost/ardour2/branches/3.0@10288 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-10-22 23:18:54 +00:00
parent b12c890b81
commit ab024c7601

View File

@ -3861,11 +3861,13 @@ NoteDrag::total_dx () const
/* new time of the primary note in session frames */ /* new time of the primary note in session frames */
frameoffset_t st = n + dx; frameoffset_t st = n + dx;
framepos_t const rp = _region->region()->position ();
/* prevent the note being dragged earlier than the region's position */ /* prevent the note being dragged earlier than the region's position */
st = max (st, _region->region()->position ()); st = max (st, rp);
/* snap and return corresponding delta */ /* snap and return corresponding delta */
return _region->snap_frame_to_frame (st) - n; return _region->snap_frame_to_frame (st - rp) + rp - n;
} }
/** @return Current total drag y change in note number */ /** @return Current total drag y change in note number */