diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-26 23:55:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-26 23:55:24 +0000 |
commit | 691b0c10ac8089efa015e88513d309768fe0f44b (patch) | |
tree | 596a4d3bb6e00a30f1999e14a8e33f950d599529 /gtk2_ardour/editor_mouse.cc | |
parent | 4ab5bf08d410582ceef1ab30bfbdba9e3e71b7c2 (diff) |
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
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 11 |
1 files changed, 11 insertions, 0 deletions
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<RegionView *> (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) { |