diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-29 21:07:22 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-29 21:07:22 +0000 |
commit | d725fc2d1c16be97da968f5133150250e5b1ee2b (patch) | |
tree | 963eedbcec43efef43a642dcb4369e5cc7a2d960 | |
parent | 0dd2fb557c95f15672345e6368a478d25898a4d1 (diff) |
Make 'copy track gains to sends' and 'set sends gains' work with sends from busses. Partially fixes #3637.
git-svn-id: svn://localhost/ardour2/branches/3.0@8369 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/route_ui.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session.cc | 24 |
2 files changed, 7 insertions, 19 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index b7fef2d6ff..1c72f81ea4 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -663,7 +663,7 @@ RouteUI::build_sends_menu () items.push_back (MenuElem(_("Assign all tracks (postfader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_sends), PostFader))); items.push_back (MenuElem(_("Assign selected tracks (prefader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_selected_sends), PreFader))); items.push_back (MenuElem(_("Assign selected tracks (postfader)"), sigc::bind (sigc::mem_fun (*this, &RouteUI::create_selected_sends), PostFader))); - items.push_back (MenuElem(_("Copy track gains to sends"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_from_track))); + items.push_back (MenuElem(_("Copy track/bus gains to sends"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_from_track))); items.push_back (MenuElem(_("Set sends gain to -inf"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_to_zero))); items.push_back (MenuElem(_("Set sends gain to 0dB"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_to_unity))); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index c80f9c3e2e..9212923f11 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2057,13 +2057,9 @@ Session::globally_set_send_gains_to_zero (boost::shared_ptr<Route> dest) boost::shared_ptr<RouteList> r = routes.reader (); boost::shared_ptr<Send> s; - /* only tracks */ - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (boost::dynamic_pointer_cast<Track>(*i)) { - if ((s = (*i)->internal_send_for (dest)) != 0) { - s->amp()->gain_control()->set_value (0.0); - } + if ((s = (*i)->internal_send_for (dest)) != 0) { + s->amp()->gain_control()->set_value (0.0); } } } @@ -2074,13 +2070,9 @@ Session::globally_set_send_gains_to_unity (boost::shared_ptr<Route> dest) boost::shared_ptr<RouteList> r = routes.reader (); boost::shared_ptr<Send> s; - /* only tracks */ - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (boost::dynamic_pointer_cast<Track>(*i)) { - if ((s = (*i)->internal_send_for (dest)) != 0) { - s->amp()->gain_control()->set_value (1.0); - } + if ((s = (*i)->internal_send_for (dest)) != 0) { + s->amp()->gain_control()->set_value (1.0); } } } @@ -2091,13 +2083,9 @@ Session::globally_set_send_gains_from_track(boost::shared_ptr<Route> dest) boost::shared_ptr<RouteList> r = routes.reader (); boost::shared_ptr<Send> s; - /* only tracks */ - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (boost::dynamic_pointer_cast<Track>(*i)) { - if ((s = (*i)->internal_send_for (dest)) != 0) { - s->amp()->gain_control()->set_value ((*i)->gain_control()->get_value()); - } + if ((s = (*i)->internal_send_for (dest)) != 0) { + s->amp()->gain_control()->set_value ((*i)->gain_control()->get_value()); } } } |