summaryrefslogtreecommitdiff
path: root/libs/ardour/playlist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r--libs/ardour/playlist.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 0e1aad110d..12490d02d7 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -1196,7 +1196,6 @@ Playlist::flush_notifications (bool from_undo)
times = fabs (times);
{
- RegionWriteLock rl1 (this);
RegionReadLock rl2 (other.get());
int itimes = (int) floor (times);
@@ -1204,18 +1203,21 @@ Playlist::flush_notifications (bool from_undo)
framecnt_t const shift = other->_get_extent().second;
layer_t top = top_layer ();
- while (itimes--) {
- for (RegionList::iterator i = other->regions.begin(); i != other->regions.end(); ++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.
- */
-
- add_region_internal (copy_of_region, (*i)->position() + pos);
- set_layer (copy_of_region, copy_of_region->layer() + top);
+ {
+ RegionWriteLock rl1 (this);
+ while (itimes--) {
+ for (RegionList::iterator i = other->regions.begin(); i != other->regions.end(); ++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.
+ */
+
+ add_region_internal (copy_of_region, (*i)->position() + pos);
+ set_layer (copy_of_region, copy_of_region->layer() + top);
+ }
+ pos += shift;
}
- pos += shift;
}
}