diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2015-01-08 16:00:36 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2015-01-08 16:00:49 -0600 |
commit | f7e3d1be2c3cad8e3c7ac9910970c6bd87d3f536 (patch) | |
tree | a89390fe404542cd37e1fca98a80a543ac0eb9f4 /gtk2_ardour/editor_ops.cc | |
parent | 5ab70b6822fde1b1d0378e525098092ab0cab201 (diff) |
change Split menu entry to say Split/Separate (it was already doing that anyway). also fix a bug so you can drag the playhead and split at the playhead location
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 4ce5d09f3b..ec196874d6 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -5794,20 +5794,25 @@ Editor::set_playhead_cursor () void Editor::split_region () { + //if a range is selected, separate it if ( !selection->time.empty()) { separate_regions_between (selection->time); return; } - RegionSelection rs = get_regions_from_selection_and_edit_point (); + //if no range was selected, try to find some regions to split + if (current_mouse_mode() == MouseObject) { //don't try this for Internal Edit, Stretch, Draw, etc. + + RegionSelection rs = get_regions_from_selection_and_edit_point (); - framepos_t where = get_preferred_edit_position (); + framepos_t where = get_preferred_edit_position (); - if (rs.empty()) { - return; - } + if (rs.empty()) { + return; + } - split_regions_at (where, rs); + split_regions_at (where, rs); + } } struct EditorOrderRouteSorter { |