diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index 8879eadea5..cea6b128f5 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -1059,6 +1059,7 @@ Editor::finish_bringing_in_material (std::shared_ptr region, std::shared_ptr playlist = existing_track->playlist(); std::shared_ptr copy (RegionFactory::create (region, region->derive_properties ())); + copy->set_region_group(false); playlist->clear_changes (); playlist->clear_owned_changes (); playlist->add_region (copy, pos); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 842eb06ba0..75757a49ef 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -199,6 +199,9 @@ Editor::split_regions_at (timepos_t const & where, RegionSelection& regions) return; } + /* the Split action will likely create new regions; we want them all assigned to the same region-group */ + Region::RegionGroupRetainer rgr; + begin_reversible_command (_("split")); @@ -3325,6 +3328,9 @@ Editor::separate_regions_between (const TimeSelection& ts) std::shared_ptr playlist; RegionSelection new_selection; + /* the Separate action will likely create a lot of regions; we want them all assigned to the same region-group */ + Region::RegionGroupRetainer rgr; + TrackViewList tmptracks = get_tracks_for_range_action (); sort_track_selection (tmptracks); @@ -4514,6 +4520,9 @@ Editor::cut_copy (CutCopyOp op) string opname; + /* the Cut action can create a lot of regions; we want them assigned to sensible region-groups */ + Region::RegionGroupRetainer rgr; + switch (op) { case Delete: opname = _("delete"); @@ -5229,6 +5238,9 @@ Editor::paste_internal (timepos_t const & pos, float times) return; } + /* the Paste operation will result in one or more new regions, and we want them to share a region-group-id */ + Region::RegionGroupRetainer rgr; + if (position == timepos_t::max (position.time_domain())) { position = get_preferred_edit_position(); DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("preferred edit position is %1\n", position));