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:
parent
12f443c721
commit
b12c890b81
@ -3858,13 +3858,11 @@ NoteDrag::total_dx () const
|
|||||||
/* primary note time */
|
/* primary note time */
|
||||||
frameoffset_t const n = _region->source_beats_to_absolute_frames (_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;
|
frameoffset_t st = n + dx;
|
||||||
|
|
||||||
/* prevent the note being dragged earlier than the region's position */
|
/* prevent the note being dragged earlier than the region's position */
|
||||||
if (st < 0) {
|
st = max (st, _region->region()->position ());
|
||||||
st = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 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) - n;
|
||||||
|
Loading…
Reference in New Issue
Block a user