From 0ddfd7c8733c26b9d76971da51d2a0ed0dc0e6fb Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 13 Mar 2021 09:21:29 -0700 Subject: [PATCH] force drag-created regions to use beat time for position --- gtk2_ardour/editor_drag.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 3b8b99d494..2967441bd8 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -569,8 +569,11 @@ Drag::add_midi_region (MidiTimeAxisView* view, bool commit) /* 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 (grab_time(), len, commit); + return view->add_region (beats, len, commit); } return boost::shared_ptr();