diff options
author | David Robillard <d@drobilla.net> | 2007-06-23 20:13:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-23 20:13:13 +0000 |
commit | 49ee64ada7f7661067a1dde8c02d40a8e2f6ca66 (patch) | |
tree | b1c4472355e6e3c65ca907c5c3e13959fb2e46cf /libs/ardour/playlist.cc | |
parent | 05184ed52ffcdcad3c071d4c99287f832f42b74b (diff) |
Insert/Redirect refactoring, towards better MIDI support in mixer strip, and
http://ardour.org/node/1043 style things.
git-svn-id: svn://localhost/ardour2/trunk@2027 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 92e0503bb4..4af7e2b907 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -71,7 +71,7 @@ struct RegionSortByLastLayerOp { }; Playlist::Playlist (Session& sess, string nom, DataType type, bool hide) - : _session (sess) + : SessionObject(sess, nom) , _type(type) { init (hide); @@ -81,7 +81,7 @@ Playlist::Playlist (Session& sess, string nom, DataType type, bool hide) } Playlist::Playlist (Session& sess, const XMLNode& node, DataType type, bool hide) - : _session (sess) + : SessionObject(sess, "unnamed playlist") , _type(type) { const XMLProperty* prop = node.property("type"); @@ -94,7 +94,7 @@ Playlist::Playlist (Session& sess, const XMLNode& node, DataType type, bool hide } Playlist::Playlist (boost::shared_ptr<const Playlist> other, string namestr, bool hide) - : _name (namestr), _session (other->_session), _type(other->_type), _orig_diskstream_id(other->_orig_diskstream_id) + : SessionObject(other->_session, namestr), _type(other->_type), _orig_diskstream_id(other->_orig_diskstream_id) { init (hide); @@ -126,7 +126,7 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, string namestr, boo } Playlist::Playlist (boost::shared_ptr<const Playlist> other, nframes_t start, nframes_t cnt, string str, bool hide) - : _name (str), _session (other->_session), _type(other->_type), _orig_diskstream_id(other->_orig_diskstream_id) + : SessionObject(other->_session, str), _type(other->_type), _orig_diskstream_id(other->_orig_diskstream_id) { RegionLock rlock2 (const_cast<Playlist*> (other.get())); @@ -247,14 +247,14 @@ Playlist::init (bool hide) } Playlist::Playlist (const Playlist& pl) - : _session (pl._session) + : SessionObject(pl._session, pl._name) , _type(pl.data_type()) { fatal << _("playlist const copy constructor called") << endmsg; } Playlist::Playlist (Playlist& pl) - : _session (pl._session) + : SessionObject(pl._session, pl._name) , _type(pl.data_type()) { fatal << _("playlist non-const copy constructor called") << endmsg; @@ -273,8 +273,8 @@ Playlist::~Playlist () /* GoingAway must be emitted by derived classes */ } -void -Playlist::set_name (string str) +bool +Playlist::set_name (const string& str) { /* in a typical situation, a playlist is being used by one diskstream and also is referenced by the @@ -283,11 +283,10 @@ Playlist::set_name (string str) */ if (_refcnt > 2) { - return; + return false; + } else { + return SessionObject::set_name(str); } - - _name = str; - NameChanged(); /* EMIT SIGNAL */ } /*********************************************************************** |