Fix check on dragging MIDI notes to a point before the region position.

git-svn-id: svn://localhost/ardour2/branches/3.0@10287 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-10-22 23:17:08 +00:00
parent 12f443c721
commit b12c890b81

View File

@ -3858,13 +3858,11 @@ NoteDrag::total_dx () const
/* primary note time */
frameoffset_t const n = _region->source_beats_to_absolute_frames (_primary->note()->time ());
/* new time of the primary note relative to the region position */
/* new time of the primary note in session frames */
frameoffset_t st = n + dx;
/* prevent the note being dragged earlier than the region's position */
if (st < 0) {
st = 0;
}
st = max (st, _region->region()->position ());
/* snap and return corresponding delta */
return _region->snap_frame_to_frame (st) - n;