diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-07-07 10:13:19 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-07-07 10:13:26 -0400 |
commit | d97199088bb6ee95e4cd6b4e6450ad9a54f559c1 (patch) | |
tree | 52285566a3a5707013fecf870cdbd8de0bb60422 /gtk2_ardour/editor_drag.cc | |
parent | b39c30dbd16d982529396d5a096382f88b3b6a38 (diff) |
some code shuffling to make sure that cut mode always operates at the mouse location, with (maybe) the right regions
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 10968d1cfb..bf013c4352 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -5449,11 +5449,12 @@ CrossfadeEdgeDrag::aborted (bool) } } -RegionCutDrag::RegionCutDrag (Editor* e, ArdourCanvas::Item* item) +RegionCutDrag::RegionCutDrag (Editor* e, ArdourCanvas::Item* item, framepos_t pos) : Drag (e, item, true) , line (new EditorCursor (*e)) { - line->set_position (_editor->get_preferred_edit_position()); + line->set_position (pos); + line->show (); } RegionCutDrag::~RegionCutDrag () @@ -5471,7 +5472,14 @@ void RegionCutDrag::finished (GdkEvent*, bool) { line->hide (); - _editor->split_region (); + + RegionSelection rs = _editor->get_regions_from_selection_and_mouse (); + + if (rs.empty()) { + return; + } + + _editor->split_regions_at (_drags->current_pointer_frame(), rs); } void |