diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-05-26 17:22:22 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-05-26 17:22:22 +0000 |
commit | d6be900da002cde17570e742bcc48f1588f73dc9 (patch) | |
tree | 8996b368649d87610329a54385960ee3c013204f /libs/ardour/playlist_source.cc | |
parent | 92ede6153eaf7eaae359a456307f697d04e2fcb7 (diff) |
more combine/uncombine fixes including making uncombine push the compound region gain level into the constituents and doing the right thing when we uncombine in a playlist other than the one in which the compound region was created
git-svn-id: svn://localhost/ardour2/branches/3.0@9601 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/playlist_source.cc')
-rw-r--r-- | libs/ardour/playlist_source.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/playlist_source.cc b/libs/ardour/playlist_source.cc index a1597a76d2..7bbfdecd82 100644 --- a/libs/ardour/playlist_source.cc +++ b/libs/ardour/playlist_source.cc @@ -43,10 +43,11 @@ using namespace std; using namespace ARDOUR; using namespace PBD; -PlaylistSource::PlaylistSource (Session& s, const std::string& name, boost::shared_ptr<Playlist> p, DataType type, +PlaylistSource::PlaylistSource (Session& s, const ID& orig, const std::string& name, boost::shared_ptr<Playlist> p, DataType type, frameoffset_t begin, framecnt_t len, Source::Flag flags) : Source (s, type, name) , _playlist (p) + , _original (orig) { /* PlaylistSources are never writable, renameable, removable or destructive */ _flags = Flag (_flags & ~(Writable|CanRename|Removable|RemovableIfEmpty|RemoveAtDestroy|Destructive)); @@ -85,6 +86,7 @@ PlaylistSource::add_state (XMLNode& node) node.add_property ("offset", buf); snprintf (buf, sizeof (buf), "%" PRIu64, _playlist_length); node.add_property ("length", buf); + node.add_property ("original", _id.to_s()); node.add_child_nocopy (_playlist->get_state()); } @@ -139,6 +141,12 @@ PlaylistSource::set_state (const XMLNode& node, int version) sscanf (prop->value().c_str(), "%" PRIu64, &_playlist_length); + if ((prop = node.property (X_("original"))) == 0) { + throw failed_constructor (); + } + + _id = prop->value(); + _level = _playlist->max_source_level () + 1; return 0; |