From b02c3bbac4bb93f2ac0d465ba04ffe0462e8341d 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 2/2] name 'New Playlist (for group)' after group

Default the playlist name chosen by 'New Playlist (for group)' to be the
group name, if any, or the track mane otherwise, followed by an
incrementing number.
---
 gtk2_ardour/editor.cc | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 441098ff0e..141763199d 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,13 @@ 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)) {
+	std::shared_ptr<RouteGroup> rg = rui->route_group();
+	if (rg)
+		name = rg->name() + ".1";
+	else
+		name = rui->track()->playlist()->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

