13
0

Playlist UI Tweaks: check the return value of stamp_new_playlist so user can Cancel

This commit is contained in:
Ben Loftis 2021-07-16 09:08:52 -05:00
parent b798d6cd77
commit 6813488025

View File

@ -4419,45 +4419,45 @@ void
Editor::new_playlists_for_all_tracks (bool copy) Editor::new_playlists_for_all_tracks (bool copy)
{ {
string name, gid; string name, gid;
stamp_new_playlist(name,gid,copy); if (stamp_new_playlist(name,gid,copy)) {
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists()->get (playlists); _session->playlists()->get (playlists);
mapover_all_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); mapover_all_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
} }
}
void void
Editor::new_playlists_for_grouped_tracks (RouteUI* rui, bool copy) Editor::new_playlists_for_grouped_tracks (RouteUI* rui, bool copy)
{ {
string name, gid; string name, gid;
stamp_new_playlist(name,gid,copy); if (stamp_new_playlist(name,gid,copy)) {
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists()->get (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); 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 void
Editor::new_playlists_for_selected_tracks (bool copy) Editor::new_playlists_for_selected_tracks (bool copy)
{ {
string name, gid; string name, gid;
stamp_new_playlist(name,gid,copy); if (stamp_new_playlist(name,gid,copy)) {
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists()->get (playlists); _session->playlists()->get (playlists);
mapover_selected_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); mapover_selected_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
} }
}
void void
Editor::new_playlists_for_armed_tracks (bool copy) Editor::new_playlists_for_armed_tracks (bool copy)
{ {
string name, gid; string name, gid;
stamp_new_playlist(name,gid,copy); if (stamp_new_playlist(name,gid,copy)) {
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
_session->playlists()->get (playlists); _session->playlists()->get (playlists);
mapover_armed_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists)); mapover_armed_routes (sigc::bind (sigc::mem_fun (*this, &Editor::mapped_use_new_playlist), name, gid, copy, playlists));
} }
}
double double
Editor::get_y_origin () const Editor::get_y_origin () const