diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 07bd6f7d78..c6bc038846 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4572,7 +4572,7 @@ Editor::get_regions_from_selection_and_edit_point () * Note that we have forced the rule that selected regions and selected tracks are mutually exclusive */ RegionSelection -Editor::get_regions_from_selection_and_mouse () +Editor::get_regions_from_selection_and_mouse (framepos_t pos) { RegionSelection regions; @@ -4585,19 +4585,11 @@ Editor::get_regions_from_selection_and_mouse () if ( regions.empty() ) { TrackViewList tracks = selection->tracks; - if (_route_groups->all_group_active_button().get_active() && tracks.empty()) { - /* tracks is empty (no track selected), and 'No Selection = All Tracks' - * is enabled, so consider all tracks - */ - tracks = track_views; - } - if (!tracks.empty()) { /* no region selected or entered, but some selected tracks: * act on all regions on the selected tracks at the edit point */ - framepos_t const where = get_preferred_edit_position (); - get_regions_at(regions, where, tracks); + get_regions_at(regions, pos, tracks); } } diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 75b66d6f04..5499de9771 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -474,7 +474,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false); void split_regions_at (framepos_t, RegionSelection&); void split_region_at_points (boost::shared_ptr, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false); - RegionSelection get_regions_from_selection_and_mouse (); + RegionSelection get_regions_from_selection_and_mouse (framepos_t); protected: void map_transport_state (); diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index bf013c4352..fa1a31b6ec 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -5471,15 +5471,17 @@ RegionCutDrag::motion (GdkEvent*, bool) void RegionCutDrag::finished (GdkEvent*, bool) { + framepos_t pos = _drags->current_pointer_frame(); + line->hide (); - RegionSelection rs = _editor->get_regions_from_selection_and_mouse (); + RegionSelection rs = _editor->get_regions_from_selection_and_mouse (pos); if (rs.empty()) { return; } - _editor->split_regions_at (_drags->current_pointer_frame(), rs); + _editor->split_regions_at (pos, rs); } void diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 11e8931457..9e971eb5d8 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -416,7 +416,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi virtual void snap_to_with_modifier (framepos_t &, GdkEvent const *, int32_t direction = 0, bool for_mark = false) = 0; virtual void get_regions_at (RegionSelection &, framepos_t where, TrackViewList const &) const = 0; - virtual RegionSelection get_regions_from_selection_and_mouse () = 0; + virtual RegionSelection get_regions_from_selection_and_mouse (framepos_t) = 0; /// Singleton instance, set up by Editor::Editor()