From 1007b60ae7593a25dc28c0e4beaba75ef559cca8 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Fri, 12 Mar 2010 16:45:34 +0000 Subject: [PATCH] route removal fixes: notify user that removing a route will result in a save. and clear a routes solos before deleting it so the other tracks will unmute git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6753 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_ops.cc | 7 ++++--- gtk2_ardour/route_ui.cc | 4 ++-- gtk2_ardour/visual_time_axis.cc | 2 +- libs/ardour/session.cc | 3 +++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index c3464033b3..d614a38ce3 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -5886,16 +5886,17 @@ Editor::remove_tracks () if (nbusses) { prompt = string_compose (_("Do you really want to remove %1 %2 and %3 %4?\n" "(You may also lose the playlists associated with the %2)\n\n" - "This action cannot be undone!"), + "This action cannot be undone, and the session file will be overwritten!"), ntracks, trackstr, nbusses, busstr); } else { prompt = string_compose (_("Do you really want to remove %1 %2?\n" "(You may also lose the playlists associated with the %2)\n\n" - "This action cannot be undone!"), + "This action cannot be undone, and the session file will be overwritten!"), ntracks, trackstr); } } else if (nbusses) { - prompt = string_compose (_("Do you really want to remove %1 %2?"), + prompt = string_compose (_("Do you really want to remove %1 %2?\n\n" + "This action cannot be undone, and the session file will be overwritten!"), nbusses, busstr); } diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 73a9d59540..58da7e02b1 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -924,9 +924,9 @@ RouteUI::remove_this_route () string prompt; if (is_track()) { - prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n(cannot be undone)"), _route->name()); + prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten!)"), _route->name()); } else { - prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n(cannot be undone)"), _route->name()); + prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n\n(This action cannot be undone, and the session file will be overwritten!)"), _route->name()); } choices.push_back (_("No, do nothing.")); diff --git a/gtk2_ardour/visual_time_axis.cc b/gtk2_ardour/visual_time_axis.cc index 468b967186..fdbd378607 100644 --- a/gtk2_ardour/visual_time_axis.cc +++ b/gtk2_ardour/visual_time_axis.cc @@ -273,7 +273,7 @@ VisualTimeAxis::remove_this_time_axis(void* src) { vector choices; - std::string prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n(cannot be undone)"), time_axis_name); + std::string prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\n(This action cannot be undone, and the session file will be overwritten!)"), time_axis_name); choices.push_back (_("No, do nothing.")); choices.push_back (_("Yes, remove it.")); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index c5036301a8..2701f79543 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2247,6 +2247,9 @@ Session::add_diskstream (boost::shared_ptr dstream) void Session::remove_route (shared_ptr route) { + //clear solos before removing the route + route->set_solo ( false, this); + { RCUWriter writer (routes); shared_ptr rs = writer.get_copy ();