diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2014-07-06 12:57:26 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2014-07-06 12:57:36 -0500 |
commit | db60bc86b8cbcee44e333047346714bd138b1ca6 (patch) | |
tree | e7372b9a0ad38c1b68bab42777c8d132b7f8b240 /gtk2_ardour/editor_ops.cc | |
parent | 7d13a49761b046222ab4ca5cddbacd0a5ab58996 (diff) |
now that track and region selections are mutually exclusive, you need a separate action to select-all-tracks and select-all-regions. also, preserve region selection during a split, iff we are working on a region selection: only add the newly created regions, dont change anything else in the selection; leave that in control of the user
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index e4d6c267e9..9774efb853 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -133,7 +133,7 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions) { bool frozen = false; - bool operating_on_region_selection = !selection->regions.empty(); + RegionSelection pre_selected_regions = selection->regions; list<boost::shared_ptr<Playlist> > used_playlists; list<RouteTimeAxisView*> used_trackviews; @@ -234,12 +234,10 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions) EditorThaw(); /* Emit Signal */ } - //IFF we had a selected region, then we should select both sides of the new region after the split. - //(if there is no region selection then we are working on a range selection, so no changes to region selection are necessary) - if( operating_on_region_selection ) { - if (!latest_regionviews.empty()) { - selection->add (latest_regionviews); - } + //IFF we were working on selected regions, then we should select both sides of the new region after the split. + if( !pre_selected_regions.empty() ) { + selection->add (latest_regionviews); //these are the new regions, created after the split + selection->add (pre_selected_regions); //these were the old selected regions, they got lost in the freeze/thaw } } |