static PBD::Signal1<void,boost::shared_ptr<Region> > CheckNewRegion;
/** create a "pure copy" of Region @param other */
- static boost::shared_ptr<Region> create (boost::shared_ptr<const Region> other);
+ static boost::shared_ptr<Region> create (boost::shared_ptr<const Region> other, bool announce = false);
/** create a region from a single Source */
static boost::shared_ptr<Region> create (boost::shared_ptr<Source>,
{
register_properties ();
+ suspend_property_changes();
set_default_fades ();
set_default_envelope ();
+ resume_property_changes();
listen_to_my_curves ();
connect_to_analysis_changed ();
_envelope->truncate_end (_length);
_envelope->set_max_xval (_length);
_envelope->thaw ();
+
+ suspend_property_changes();
if (_left_of_split) {
set_default_fade_out ();
_fade_in->extend_to (_length);
send_change (PropertyChange (Properties::fade_in));
}
+
+ resume_property_changes();
}
void
/* as above, but the shift was from the front */
_envelope->truncate_start (_length);
+
+ suspend_property_changes();
if (_right_of_split) {
set_default_fade_in ();
_fade_out->extend_to (_length);
send_change (PropertyChange (Properties::fade_out));
}
+
+ resume_property_changes();
}
int
RegionLock rlock (const_cast<Playlist *> (this));
for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) {
- newlist.push_back (RegionFactory::RegionFactory::create (*i));
+ newlist.push_back (RegionFactory::RegionFactory::create (*i, true));
}
}
*/
for (int i = 0; i < itimes; ++i) {
- boost::shared_ptr<Region> copy = RegionFactory::create (region);
+ boost::shared_ptr<Region> copy = RegionFactory::create (region, true);
add_region_internal (copy, pos);
pos += region->length();
}
while (itimes--) {
for (RegionList::iterator i = other->regions.begin(); i != other->regions.end(); ++i) {
- boost::shared_ptr<Region> copy_of_region = RegionFactory::create (*i);
+ boost::shared_ptr<Region> copy_of_region = RegionFactory::create (*i, true);
/* put these new regions on top of all existing ones, but preserve
the ordering they had in the original playlist.
framepos_t pos = position + 1;
while (itimes--) {
- boost::shared_ptr<Region> copy = RegionFactory::create (region);
+ boost::shared_ptr<Region> copy = RegionFactory::create (region, true);
add_region_internal (copy, pos);
pos += region->length();
}
std::map<std::string, uint32_t> RegionFactory::region_name_map;
boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<const Region> region)
+RegionFactory::create (boost::shared_ptr<const Region> region, bool announce)
{
boost::shared_ptr<Region> ret;
boost::shared_ptr<const AudioRegion> ar;
}
if (ret) {
+ ret->set_name (new_region_name(ret->name()));
map_add (ret);
/* pure copy constructor - no property list */
/* pure copy constructor - no CheckNewRegion emitted */
+ if (announce) {
+ CheckNewRegion (ret);
+ }
}
+
return ret;
}