mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
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:
parent
d1f58cf5a4
commit
55586be83a
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue