+
+ boost::shared_ptr<Playlist> ipl = session()->playlists->by_name(playlist_name);
+ if (!ipl) {
+ // No playlist for this track for this take yet, make it
+ track->use_new_playlist();
+ track->playlist()->set_name(playlist_name);
+ } else {
+ track->use_playlist(ipl);
+ }
+ }
+ }
+}
+
+void
+RouteTimeAxisView::update_playlist_tip ()
+{
+ RouteGroup* rg = route_group ();
+ if (rg && rg->is_active() && rg->enabled_property (ARDOUR::Properties::select.property_id)) {
+ string group_string = "." + rg->name() + ".";
+
+ string take_name = track()->playlist()->name();
+ string::size_type idx = take_name.find(group_string);
+
+ if (idx != string::npos) {
+ /* find the bit containing the take number / name */
+ take_name = take_name.substr (idx + group_string.length());
+
+ /* set the playlist button tooltip to the take name */
+ ARDOUR_UI::instance()->set_tip (
+ playlist_button,
+ string_compose(_("Take: %1.%2"),
+ Glib::Markup::escape_text(rg->name()),
+ Glib::Markup::escape_text(take_name))
+ );
+
+ return;