From 691b0c10ac8089efa015e88513d309768fe0f44b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 26 Feb 2007 23:55:24 +0000 Subject: [PATCH] patch from mantis user cth103 to fix up fixed-time cross-track drags git-svn-id: svn://localhost/ardour2/trunk@1519 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_mouse.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index cd5d5854dd..fdb62f3989 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -1522,6 +1522,17 @@ Editor::motion_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item drag_info.move_threshold_passed = (abs ((int) (drag_info.current_pointer_x - drag_info.grab_x)) > 4); + /* if we are dragging Regions we must also consider a change in track + ** as passing the move threshold, otherwise e.g. copying regions to + ** the same temporal position on a different track doesn't work. + */ + if (drag_info.item_type == RegionItem) { + RegionView* rv = reinterpret_cast (drag_info.data); + if (drag_info.last_trackview != &rv->get_time_axis_view()) { + drag_info.move_threshold_passed = true; + } + } + // and change the initial grab loc/frame if this drag info wants us to if (drag_info.want_move_threshold && drag_info.move_threshold_passed) {