X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fnamed_selection.cc;h=fbb4b748df5176ed71e7d9c93d6c149e8ca5dcf2;hb=8ab17e96312f1a61c014c50687e15430d5ae786b;hp=ecce09692f20ccc8d7a224247688775ba46fd08e;hpb=af12adb34f62dc82f694a03ea3b2a6c99ba426ef;p=ardour.git diff --git a/libs/ardour/named_selection.cc b/libs/ardour/named_selection.cc index ecce09692f..fbb4b748df 100644 --- a/libs/ardour/named_selection.cc +++ b/libs/ardour/named_selection.cc @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include @@ -40,8 +39,18 @@ NamedSelection::NamedSelection (string n, PlaylistList& l) { playlists = l; for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { + string new_name; + + /* rename playlists to reflect our ownership */ + + new_name = name; + new_name += '/'; + new_name += (*i)->name(); + + (*i)->set_name (new_name); (*i)->use(); } + NamedSelectionCreated (this); } @@ -90,7 +99,8 @@ NamedSelection::NamedSelection (Session& session, const XMLNode& node) NamedSelection::~NamedSelection () { for (PlaylistList::iterator i = playlists.begin(); i != playlists.end(); ++i) { - (*i)->release(); + (*i)->release (); + (*i)->GoingAway (); } }