+ playlist_items.push_back (MenuElem(_("Select from all ..."), mem_fun(*this, &RouteTimeAxisView::show_playlist_selector)));
+}
+
+void
+RouteTimeAxisView::use_playlist (RadioMenuItem *item, boost::weak_ptr<Playlist> wpl)
+{
+ assert (is_track());
+
+ // exit if we were triggered by deactivating the old playlist
+ if (!item->get_active()) {
+ return;
+ }
+
+ boost::shared_ptr<Playlist> pl (wpl.lock());
+
+ if (!pl) {
+ return;
+ }
+
+ boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist> (pl);
+
+ if (apl) {
+ if (get_diskstream()->playlist() == apl) {
+ // exit when use_playlist is called by the creation of the playlist menu
+ // or the playlist choice is unchanged
+ return;
+ }
+
+ get_diskstream()->use_playlist (apl);
+
+ if (edit_group() && edit_group()->is_active()) {
+ //PBD::stacktrace(cerr, 20);
+ std::string group_string = "."+edit_group()->name()+".";
+
+ std::string take_name = apl->name();
+ std::string::size_type idx = take_name.find(group_string);
+
+ if (idx == std::string::npos)
+ return;
+
+ take_name = take_name.substr(idx + group_string.length()); // find the bit containing the take number / name
+
+ for (list<Route*>::const_iterator i = edit_group()->route_list().begin(); i != edit_group()->route_list().end(); ++i) {
+ if ( (*i) == this->route().get()) {
+ continue;
+ }
+
+ std::string playlist_name = (*i)->name()+group_string+take_name;
+
+ Track *track = dynamic_cast<Track *>(*i);
+ if (!track) {
+ continue;
+ }