summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-11-19 17:06:00 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-11-19 17:06:00 +0000
commit23c79d85035d925536c8beed0064b7867137dfd6 (patch)
tree6941de348e88e45ef013a2e37129c9fff2e4e810 /gtk2_ardour/route_ui.cc
parent281d6c1bbd432dec79a83b6a00ae5175cf995ae2 (diff)
add new Graph debug bit ; make adding aux sends really work
git-svn-id: svn://localhost/ardour2/branches/3.0@6132 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 5104601ba7..e06b9b18c4 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -44,6 +44,7 @@
#include "latency_gui.h"
#include "mixer_strip.h"
#include "automation_time_axis.h"
+#include "route_time_axis.h"
#include "ardour/route.h"
#include "ardour/event_type_map.h"
@@ -534,6 +535,8 @@ RouteUI::build_sends_menu ()
items.push_back (MenuElem(_("Assign all tracks (prefader)"), bind (mem_fun (*this, &RouteUI::create_sends), PreFader)));
items.push_back (MenuElem(_("Assign all tracks (postfader)"), bind (mem_fun (*this, &RouteUI::create_sends), PostFader)));
+ items.push_back (MenuElem(_("Assign selected tracks (prefader)"), bind (mem_fun (*this, &RouteUI::create_selected_sends), PreFader)));
+ items.push_back (MenuElem(_("Assign selected tracks (postfader)"), bind (mem_fun (*this, &RouteUI::create_selected_sends), PostFader)));
items.push_back (MenuElem(_("Copy track gains to sends"), mem_fun (*this, &RouteUI::set_sends_gain_from_track)));
items.push_back (MenuElem(_("Set sends gain to -inf"), mem_fun (*this, &RouteUI::set_sends_gain_to_zero)));
items.push_back (MenuElem(_("Set sends gain to 0dB"), mem_fun (*this, &RouteUI::set_sends_gain_to_unity)));
@@ -547,6 +550,27 @@ RouteUI::create_sends (Placement p)
}
void
+RouteUI::create_selected_sends (Placement p)
+{
+ boost::shared_ptr<RouteList> rlist (new RouteList);
+ TrackSelection& selected_tracks (ARDOUR_UI::instance()->the_editor().get_selection().tracks);
+
+ for (TrackSelection::iterator i = selected_tracks.begin(); i != selected_tracks.end(); ++i) {
+ RouteTimeAxisView* rtv;
+ RouteUI* rui;
+ if ((rtv = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) {
+ if ((rui = dynamic_cast<RouteUI*>(rtv)) != 0) {
+ if (boost::dynamic_pointer_cast<AudioTrack>(rui->route())) {
+ rlist->push_back (rui->route());
+ }
+ }
+ }
+ }
+
+ _session.add_internal_sends (_route, p, rlist);
+}
+
+void
RouteUI::set_sends_gain_from_track ()
{
_session.globally_set_send_gains_from_track (_route);