From 6813488025e30c080e787c472e9b1e912c828cd5 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Fri, 16 Jul 2021 09:08:52 -0500 Subject: [PATCH] Playlist UI Tweaks: check the return value of stamp_new_playlist so user can Cancel --- gtk2_ardour/editor.cc | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index f786e3abb2..e233d079f6 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4419,44 +4419,44 @@ void Editor::new_playlists_for_all_tracks (bool copy) { string name, gid; - stamp_new_playlist(name,gid,copy); - - vector > playlists; - _session->playlists()->get (playlists); - mapover_all_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); + if (stamp_new_playlist(name,gid,copy)) { + vector > playlists; + _session->playlists()->get (playlists); + mapover_all_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); + } } void Editor::new_playlists_for_grouped_tracks (RouteUI* rui, bool copy) { string name, gid; - stamp_new_playlist(name,gid,copy); - - vector > 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); + if (stamp_new_playlist(name,gid,copy)) { + vector > 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); + } } void Editor::new_playlists_for_selected_tracks (bool copy) { string name, gid; - stamp_new_playlist(name,gid,copy); - - vector > playlists; - _session->playlists()->get (playlists); - mapover_selected_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); + if (stamp_new_playlist(name,gid,copy)) { + vector > playlists; + _session->playlists()->get (playlists); + mapover_selected_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); + } } void Editor::new_playlists_for_armed_tracks (bool copy) { string name, gid; - stamp_new_playlist(name,gid,copy); - - vector > playlists; - _session->playlists()->get (playlists); - mapover_armed_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); + if (stamp_new_playlist(name,gid,copy)) { + vector > playlists; + _session->playlists()->get (playlists); + mapover_armed_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); + } } double