13
0

paste_pos_beats should be source-relative, not region position relative; fixes some misplaced pastes.

git-svn-id: svn://localhost/ardour2/branches/3.0@11646 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-03-12 00:29:53 +00:00
parent 7b43cb4298
commit ba145778cb

View File

@ -3215,7 +3215,7 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb)
Evoral::MusicalTime end_point = 0; Evoral::MusicalTime end_point = 0;
duration = (*mcb.notes().rbegin())->end_time() - (*mcb.notes().begin())->time(); duration = (*mcb.notes().rbegin())->end_time() - (*mcb.notes().begin())->time();
paste_pos_beats = region_frames_to_region_beats (pos - _region->position()); paste_pos_beats = absolute_frames_to_source_beats (pos);
beat_delta = (*mcb.notes().begin())->time() - paste_pos_beats; beat_delta = (*mcb.notes().begin())->time() - paste_pos_beats;
paste_pos_beats = 0; paste_pos_beats = 0;