hand-drawn MIDI regions should always use beat-time
This commit is contained in:
@@ -578,15 +578,9 @@ boost::shared_ptr<Region>
|
||||
Drag::add_midi_region (MidiTimeAxisView* view, bool commit)
|
||||
{
|
||||
if (_editor->session()) {
|
||||
const timepos_t pos (grab_time());
|
||||
/* not that the frame rate used here can be affected by pull up/down which
|
||||
might be wrong.
|
||||
*/
|
||||
|
||||
timepos_t beats = timepos_t (grab_time().beats());
|
||||
cerr << "Adding region based on grab @ " << grab_time() << " = " << beats << " aka " << beats.beats() << endl;
|
||||
timecnt_t len = pos.distance (max (timepos_t::zero (Temporal::BeatTime), timepos_t (pos.beats() + Beats (1, 0))));
|
||||
return view->add_region (beats, len, commit);
|
||||
const timepos_t pos (grab_time().beats());
|
||||
const timecnt_t len = pos.distance (max (timepos_t::zero (Temporal::BeatTime), timepos_t (pos.beats() + Beats (1, 0))));
|
||||
return view->add_region (pos, len, commit);
|
||||
}
|
||||
|
||||
return boost::shared_ptr<Region>();
|
||||
|
||||
Reference in New Issue
Block a user