+void
+Playlist::ripple_locked (framepos_t at, framecnt_t distance, RegionList *exclude)
+{
+ {
+ RegionWriteLock rl (this);
+ core_ripple (at, distance, exclude);
+ }
+}
+
+void
+Playlist::ripple_unlocked (framepos_t at, framecnt_t distance, RegionList *exclude)
+{
+ core_ripple (at, distance, exclude);
+}
+
+void
+Playlist::core_ripple (framepos_t at, framecnt_t distance, RegionList *exclude)
+{
+ if (distance == 0) {
+ return;
+ }
+
+ _rippling = true;
+ RegionListProperty copy = regions;
+ for (RegionList::iterator i = copy.begin(); i != copy.end(); ++i) {
+ assert (i != copy.end());
+
+ if (exclude) {
+ if (std::find(exclude->begin(), exclude->end(), (*i)) != exclude->end()) {
+ continue;
+ }
+ }
+
+ if ((*i)->position() >= at) {
+ framepos_t new_pos = (*i)->position() + distance;
+ framepos_t limit = max_framepos - (*i)->length();
+ if (new_pos < 0) {
+ new_pos = 0;
+ } else if (new_pos >= limit ) {
+ new_pos = limit;
+ }
+
+ (*i)->set_position (new_pos);
+ }
+ }
+
+ _rippling = false;
+ notify_contents_changed ();
+}
+
+
+void
+Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shared_ptr<Region> region)
+{
+ if (in_set_state || _splicing || _rippling || _nudging || _shuffling) {