From d0abe7e7420c66046b4ae6d39ce547e39fdc30c5 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 14 Jul 2020 09:33:22 -0500 Subject: [PATCH] Consolidate action adds a whole-file region (for the Source list) AND a region on the timeline (just as if you recorded it) --- gtk2_ardour/editor_ops.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index bfea619dcb..e82cafba6b 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4147,6 +4147,7 @@ Editor::bounce_range_selection (bool replace, bool enable_processing) boost::shared_ptr r; + /*make the "source" (whole-file region)*/ if (enable_processing) { r = rtv->track()->bounce_range (start, start+cnt, itt, rtv->track()->main_outs(), false, bounce_name); } else { @@ -4158,10 +4159,17 @@ Editor::bounce_range_selection (bool replace, bool enable_processing) } if (replace) { + /*remove the edxisting regions under the edit range*/ list ranges; ranges.push_back (AudioRange (start, start+cnt, 0)); playlist->cut (ranges); // discard result - playlist->add_region (r, start); + + /*SPECIAL CASE: we are bouncing to a new Source *AND* replacing the existing range on the timeline (consolidate)*/ + /*we don't add the whole_file region here; we insert a discrete copy*/ + PropertyList plist; + plist.add (ARDOUR::Properties::whole_file, false); + boost::shared_ptr copy (RegionFactory::create (r, plist)); + playlist->add_region (copy, start); } if (!in_command) {