Inherit Region Properties when splitting MIDI regions

see also e40f58c106
This commit is contained in:
Robin Gareus 2022-10-24 07:11:32 +02:00
parent 7337ba42f5
commit 72846814ba
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 3 additions and 7 deletions

View File

@ -226,31 +226,27 @@ MidiPlaylist::_split_region (boost::shared_ptr<Region> region, timepos_t const &
RegionFactory::region_name (before_name, region->name(), false);
{
PropertyList plist;
PropertyList plist (region->derive_properties (false));
plist.add (Properties::length, before);
plist.add (Properties::name, before_name);
plist.add (Properties::left_of_split, true);
plist.add (Properties::layering_index, region->layering_index ());
plist.add (Properties::layer, region->layer ());
/* note: we must use the version of ::create with an offset here,
since it supplies that offset to the Region constructor, which
is necessary to get audio region gain envelopes right.
*/
left = RegionFactory::create (region, plist, true, &thawlist);
left = RegionFactory::create (region, plist, true, &thawlist);
}
RegionFactory::region_name (after_name, region->name(), false);
{
PropertyList plist;
PropertyList plist (region->derive_properties (false));
plist.add (Properties::length, after);
plist.add (Properties::name, after_name);
plist.add (Properties::right_of_split, true);
plist.add (Properties::layering_index, region->layering_index ());
plist.add (Properties::layer, region->layer ());
/* same note as above */
right = RegionFactory::create (region, before, plist, true, &thawlist);