diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-01-08 22:19:36 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-01-08 22:21:21 -0700 |
commit | 965bf74f2b53ec209716b75a940f3da805cc5a9e (patch) | |
tree | d373d3494df0f4df5f96e1687c66033a15fdca55 /libs/ardour/playlist.cc | |
parent | 1c86b0ce131891cf02732243090bbd9b48d3f2a1 (diff) |
expand the test used to decide if we need to make copies when uncombining a compound region
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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<Region> 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<PlaylistSource> (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<Region> 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); |