NoteCreateDrag - Fix incorrect note length due to use of region-relative position

This commit is contained in:
nick_m 2017-06-10 03:49:01 +10:00
parent 48ea6beaad
commit 8502aa18c5

View File

@ -6690,7 +6690,7 @@ NoteCreateDrag::finished (GdkEvent* ev, bool had_movement)
framepos_t const start = min (_note[0], _note[1]);
framepos_t const start_sess_rel = start + _region_view->region()->position();
framecnt_t length = max (_editor->pixel_to_sample (1.0), (framecnt_t) fabs ((double)(_note[0] - _note[1])));
framecnt_t const g = grid_frames (start);
framecnt_t const g = grid_frames (start_sess_rel);
if (_editor->get_grid_music_divisions (ev->button.state) != 0 && length < g) {
length = g;