Allow to create regions from sources with signals suspended
See also 65cc9264c8
This commit is contained in:
parent
80f6f152ee
commit
3e04e30e9e
@ -73,11 +73,11 @@ public:
|
||||
|
||||
/** create a region from a single Source */
|
||||
static boost::shared_ptr<Region> create (boost::shared_ptr<Source>,
|
||||
const PBD::PropertyList&, bool announce = true);
|
||||
const PBD::PropertyList&, bool announce = true, ThawList* tl = 0);
|
||||
|
||||
/** create a region from a multiple sources */
|
||||
static boost::shared_ptr<Region> create (const SourceList &,
|
||||
const PBD::PropertyList&, bool announce = true);
|
||||
const PBD::PropertyList&, bool announce = true, ThawList* tl = 0);
|
||||
/** create a copy of \p other starting at zero within \p other's sources */
|
||||
static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other,
|
||||
const PBD::PropertyList&, bool announce = true, ThawList* tl = 0);
|
||||
@ -86,7 +86,7 @@ public:
|
||||
const PBD::PropertyList&, bool announce = true, ThawList* tl = 0);
|
||||
/** create a "copy" of \p other but using a different set of sources \p srcs */
|
||||
static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, const SourceList& srcs,
|
||||
const PBD::PropertyList&, bool announce = true);
|
||||
const PBD::PropertyList&, bool announce = true, ThawList* tl = 0);
|
||||
|
||||
/** create a region with no sources, using XML state */
|
||||
static boost::shared_ptr<Region> create (Session&, XMLNode&, bool);
|
||||
|
@ -196,7 +196,7 @@ RegionFactory::create (boost::shared_ptr<Region> region, MusicSample offset, con
|
||||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
RegionFactory::create (boost::shared_ptr<Region> region, const SourceList& srcs, const PropertyList& plist, bool announce)
|
||||
RegionFactory::create (boost::shared_ptr<Region> region, const SourceList& srcs, const PropertyList& plist, bool announce, ThawList* tl)
|
||||
{
|
||||
boost::shared_ptr<Region> ret;
|
||||
boost::shared_ptr<const AudioRegion> other;
|
||||
@ -218,6 +218,11 @@ RegionFactory::create (boost::shared_ptr<Region> region, const SourceList& srcs,
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
if (tl) {
|
||||
ret->suspend_property_changes ();
|
||||
tl->add (ret);
|
||||
}
|
||||
|
||||
ret->apply_changes (plist);
|
||||
|
||||
if (ret->session().config.get_glue_new_regions_to_bars_and_beats() && ret->position_lock_style() != MusicTime) {
|
||||
@ -235,15 +240,15 @@ RegionFactory::create (boost::shared_ptr<Region> region, const SourceList& srcs,
|
||||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
RegionFactory::create (boost::shared_ptr<Source> src, const PropertyList& plist, bool announce)
|
||||
RegionFactory::create (boost::shared_ptr<Source> src, const PropertyList& plist, bool announce, ThawList* tl)
|
||||
{
|
||||
SourceList srcs;
|
||||
srcs.push_back (src);
|
||||
return create (srcs, plist, announce);
|
||||
return create (srcs, plist, announce, tl);
|
||||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
RegionFactory::create (const SourceList& srcs, const PropertyList& plist, bool announce)
|
||||
RegionFactory::create (const SourceList& srcs, const PropertyList& plist, bool announce, ThawList* tl)
|
||||
{
|
||||
boost::shared_ptr<Region> ret;
|
||||
boost::shared_ptr<AudioSource> as;
|
||||
@ -260,6 +265,11 @@ RegionFactory::create (const SourceList& srcs, const PropertyList& plist, bool a
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
if (tl) {
|
||||
ret->suspend_property_changes ();
|
||||
tl->add (ret);
|
||||
}
|
||||
|
||||
ret->apply_changes (plist);
|
||||
|
||||
if (ret->session().config.get_glue_new_regions_to_bars_and_beats() && ret->position_lock_style() != MusicTime) {
|
||||
|
Loading…
Reference in New Issue
Block a user