13
0

Prevent note drags from moving a note before the start of its region.

git-svn-id: svn://localhost/ardour2/branches/3.0@9463 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-05-03 00:45:54 +00:00
parent d1f58cf5a4
commit 55586be83a

View File

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