From 6a09c507959db15297a4cdc840c10fd7592f8220 Mon Sep 17 00:00:00 2001
From: Colin Fletcher <colin.m.fletcher@googlemail.com>
Date: Sun, 10 May 2026 22:38:26 +0100
Subject: [PATCH 1/2] name 'New Playlist (for group)' after group

Default the playlist name chosen by 'New Playlist (for group)' to be the
group name (followed by an incrementing number if necessary).
---
 gtk2_ardour/editor.cc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 4934fce118..b474916f6b 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3653,9 +3653,10 @@ Editor::stamp_new_playlist (string title, string &name, string &pgroup, bool cop
 
 	if (name.length()==0) {
 		name = _("Take.1");
-		if (_session->playlists()->by_name (name)) {
-			name = Playlist::bump_name (name, *_session);
-		}
+	}
+
+	if (_session->playlists()->by_name (name)) {
+		name = Playlist::bump_name (name, *_session);
 	}
 
 	Prompter prompter (true);
@@ -3732,7 +3733,8 @@ void
 Editor::new_playlists_for_grouped_tracks (RouteUI* rui, bool copy)
 {
 	string name, gid;
-	if (stamp_new_playlist(  copy ?  _("Copy Playlist for this track/group") : _("New Playlist for this track/group"), name,gid,copy)) {
+	name = rui->route_group()->name();
+	if (stamp_new_playlist( copy ?  _("Copy Playlist for this track/group") : _("New Playlist for this track/group"), name, gid, copy)) {
 		vector<std::shared_ptr<ARDOUR::Playlist> > playlists;
 		_session->playlists()->get (playlists);
 		mapover_grouped_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists), rui, ARDOUR::Properties::group_select.property_id);
-- 
2.47.3

