Announce and add last duplicated regions to the region-map

This fixes a potential issue of region being retained
at session close (no DropReferences signal).
This commit is contained in:
Robin Gareus 2025-06-06 23:50:46 +02:00
parent 9aa049dae5
commit f31df0a1d1
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -1406,7 +1406,7 @@ Playlist::duplicate_until (std::shared_ptr<Region> region, timepos_t & position,
PropertyList plist (region->derive_properties ());
plist.add (Properties::length, length);
std::shared_ptr<Region> sub = RegionFactory::create (region, plist, false, &rl.thawlist);
std::shared_ptr<Region> sub = RegionFactory::create (region, plist, true, &rl.thawlist);
sub->set_region_group(Region::get_region_operation_group_id(region->region_group(), Paste));
add_region_internal (sub, position, rl.thawlist);
set_layer (sub, DBL_MAX);