From 3ab65dc62d3a6a61cee0ceff547dddc830e523bd Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 6 Jun 2021 16:41:36 -0600 Subject: [PATCH] keep session range correct when rippling markers --- libs/ardour/location.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 749284e345..3d47d37344 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -1621,6 +1621,21 @@ Locations::ripple (samplepos_t at, samplecnt_t distance, bool include_locked, bo for (LocationList::iterator i = locations.begin(); i != locations.end(); ++i) { + /* keep session range markers covering entire region if + a ripple "extends" the session. + */ + if (distance > 0 && (*i)->is_session_range()) { + + /* Don't move start unless it occurs after the ripple point. + */ + if ((*i)->start() >= at) { + (*i)->set ((*i)->start() + distance, (*i)->end() + distance); + } else { + (*i)->set_end ((*i)->end() + distance); + } + continue; + } + bool locked = (*i)->locked(); if (locked) {