From 1a736d2c86185af86c017b66aba74ec91ad951bd Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 9 Sep 2022 12:17:39 -0600 Subject: [PATCH] hand-drawn MIDI regions should always use beat-time --- gtk2_ardour/editor_drag.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 5d94e5d1e5..9da4bfac45 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -578,15 +578,9 @@ boost::shared_ptr 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();