Do not add whole-file regions to playlists
Various operations, notably time-stretch and other filters, directly added the generated whole-file region to the playlist. The editor has not listed the generated Region in the RegionList.
This commit is contained in:
@@ -680,6 +680,10 @@ Playlist::clear_pending ()
|
|||||||
void
|
void
|
||||||
Playlist::add_region (boost::shared_ptr<Region> region, timepos_t const & position, float times, bool auto_partition)
|
Playlist::add_region (boost::shared_ptr<Region> region, timepos_t const & position, float times, bool auto_partition)
|
||||||
{
|
{
|
||||||
|
if (region->whole_file ()) {
|
||||||
|
region = RegionFactory::create (region, region->derive_properties ());
|
||||||
|
}
|
||||||
|
|
||||||
RegionWriteLock rlock (this);
|
RegionWriteLock rlock (this);
|
||||||
times = fabs (times);
|
times = fabs (times);
|
||||||
|
|
||||||
@@ -792,6 +796,10 @@ Playlist::add_region_internal (boost::shared_ptr<Region> region, timepos_t const
|
|||||||
void
|
void
|
||||||
Playlist::replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, timepos_t const & pos)
|
Playlist::replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, timepos_t const & pos)
|
||||||
{
|
{
|
||||||
|
if (newr->whole_file ()) {
|
||||||
|
newr = RegionFactory::create (newr, newr->derive_properties ());
|
||||||
|
}
|
||||||
|
|
||||||
RegionWriteLock rlock (this);
|
RegionWriteLock rlock (this);
|
||||||
|
|
||||||
remove_region_internal (old, rlock.thawlist);
|
remove_region_internal (old, rlock.thawlist);
|
||||||
|
|||||||
Reference in New Issue
Block a user