From 965bf74f2b53ec209716b75a940f3da805cc5a9e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 8 Jan 2020 22:19:36 -0700 Subject: expand the test used to decide if we need to make copies when uncombining a compound region --- libs/ardour/playlist.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index adcd1d059b..0474fc0096 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -3248,7 +3248,9 @@ Playlist::uncombine (boost::shared_ptr target) the original regions that we find, and add them instead. */ - bool same_playlist = (pls->original() == id()); + + const bool need_copies = (boost::dynamic_pointer_cast (pls)->owner() != target->id()) || + (pls->original() != id()); for (RegionList::const_iterator i = rl.begin(); i != rl.end(); ++i) { @@ -3270,7 +3272,7 @@ Playlist::uncombine (boost::shared_ptr target) adjusted_end = adjusted_start + target->length(); } - if (!same_playlist) { + if (need_copies) { samplepos_t pos = original->position(); /* make a copy, but don't announce it */ original = RegionFactory::create (original, false); -- cgit v1.2.3