From c2fc7f04a7854d99e8a040ebdf52a6330bd4fe8f Mon Sep 17 00:00:00 2001 From: Colin Fletcher Date: Thu, 2 Oct 2014 21:00:33 +0100 Subject: [PATCH] Don't select newly created regions after splitting selected regions (except on Mixbus) I can't see a reason to select the newly-created regions after splitting selected regions: I can't think of any case where you'd want the next operation to apply to both the regions, and it makes it very easy (in my experience) to trim/move/&c. both regions afterwards by mistake. However, this behaviour is desired for Mixbus, so make the selection of regions after a split of selected regions dependent on Profile->get_mixbus() for now. --- gtk2_ardour/editor_ops.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 6d20b7aaf0..6824087136 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -47,6 +47,7 @@ #include "ardour/midi_track.h" #include "ardour/operations.h" #include "ardour/playlist_factory.h" +#include "ardour/profile.h" #include "ardour/quantize.h" #include "ardour/region_factory.h" #include "ardour/reverse.h" @@ -136,7 +137,7 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions) RegionSelection pre_selected_regions = selection->regions; bool working_on_selection = !pre_selected_regions.empty(); - + list > used_playlists; list used_trackviews; @@ -236,14 +237,15 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions) EditorThaw(); /* Emit Signal */ } - //IFF we were working on selected regions, try to reinstate the other region selections that existed before the freeze/thaw. - _ignore_follow_edits = true; //a split will change the region selection in mysterious ways; its not practical or wanted to follow this edit - if( working_on_selection ) { - selection->add ( pre_selected_regions ); - selection->add (latest_regionviews); //these are the new regions created after the split + if (ARDOUR::Profile->get_mixbus()) { + //IFF we were working on selected regions, try to reinstate the other region selections that existed before the freeze/thaw. + _ignore_follow_edits = true; //a split will change the region selection in mysterious ways; its not practical or wanted to follow this edit + if( working_on_selection ) { + selection->add ( pre_selected_regions ); + selection->add (latest_regionviews); //these are the new regions created after the split + } + _ignore_follow_edits = false; } - _ignore_follow_edits = false; - } /** Move one extreme of the current range selection. If more than one range is selected,