13
0

Remove assumption that the meter starts at frame 0 in Editor::apply_midi_note_edit_op_to_region().

This commit is contained in:
nick_m 2016-08-14 04:49:37 +10:00
parent 2cc37a25bb
commit a7032917b1

View File

@ -5255,8 +5255,7 @@ Editor::apply_midi_note_edit_op_to_region (MidiOperator& op, MidiRegionView& mrv
vector<Evoral::Sequence<Evoral::Beats>::Notes> v;
v.push_back (selected);
framepos_t pos_frames = mrv.midi_region()->position() - mrv.midi_region()->start();
Evoral::Beats pos_beats = _session->tempo_map().framewalk_to_beats(0, pos_frames);
Evoral::Beats pos_beats = Evoral::Beats (mrv.midi_region()->beat()) - mrv.midi_region()->start_beats();
return op (mrv.midi_region()->model(), pos_beats, v);
}