summaryrefslogtreecommitdiff
path: root/libs/ardour/region.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-02-14 21:49:43 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-02-14 21:49:43 +0000
commit7a5b6a5031d4c573c90d2455276aa174a665239b (patch)
tree5fe53c6eb77432eeb78d4a8b46dba9112e483885 /libs/ardour/region.cc
parent7ac5d03cb870acb429b7fb0c315dd5774d4e0b8c (diff)
patches from lincoln to speed up the regionlist and provide region removal (causes dangling shared ptrs to regions, fix to come
git-svn-id: svn://localhost/ardour2/branches/3.0@8845 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r--libs/ardour/region.cc29
1 files changed, 28 insertions, 1 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 5a89707495..d711695927 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -423,6 +423,7 @@ Region::set_name (const std::string& str)
if (_name != str) {
SessionObject::set_name(str); // EMIT SIGNAL NameChanged()
assert(_name == str);
+
send_change (Properties::name);
}
@@ -490,6 +491,7 @@ Region::first_edit ()
_first_edit = EditChangesNothing;
send_change (Properties::name);
+
RegionFactory::CheckNewRegion (shared_from_this());
}
}
@@ -559,6 +561,7 @@ Region::set_position_lock_style (PositionLockStyle ps)
}
send_change (Properties::position_lock_style);
+
}
}
@@ -643,7 +646,6 @@ Region::set_position_on_top (framepos_t pos, void* /*src*/)
/* do this even if the position is the same. this helps out
a GUI that has moved its representation already.
*/
-
send_change (Properties::position);
}
@@ -1023,6 +1025,7 @@ Region::set_sync_position (framepos_t absolute_pos)
if (!property_changes_suspended()) {
maybe_uncopy ();
}
+
send_change (Properties::sync_position);
}
}
@@ -1035,6 +1038,7 @@ Region::clear_sync_position ()
if (!property_changes_suspended()) {
maybe_uncopy ();
}
+
send_change (Properties::sync_position);
}
}
@@ -1428,6 +1432,29 @@ Region::source_equivalent (boost::shared_ptr<const Region> other) const
return true;
}
+std::string
+Region::source_string () const
+{
+ //string res = itos(_sources.size());
+
+ char buf[64];
+
+ stringstream res;
+ res << _sources.size() << ":";
+
+ SourceList::const_iterator i;
+
+ for (i = _sources.begin(); i != _sources.end(); ++i) {
+ res << (*i)->id() << ":";
+ }
+
+ for (i = _master_sources.begin(); i != _master_sources.end(); ++i) {
+ res << (*i)->id() << ":";
+ }
+
+ return res.str();
+}
+
bool
Region::uses_source (boost::shared_ptr<const Source> source) const
{