From f2373dc89bb62c44c585273c9ebe1809f9643371 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 23 Jun 2011 00:05:25 +0000 Subject: revert inadvertent broken changes in rev 9748 that broke route group gain control git-svn-id: svn://localhost/ardour2/branches/3.0@9763 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/gain_meter.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index b671d5674a..33688fb339 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -395,12 +395,13 @@ void GainMeterBase::gain_adjusted () { if (!ignore_toggle) { - if (_is_midi) { - _amp->set_gain (gain_adjustment.get_value(), this); + if (_route && _route->amp() == _amp) { + if (_is_midi) { + _route->set_gain (gain_adjustment.get_value(), this); + } else { + _route->set_gain (slider_position_to_gain_with_max (gain_adjustment.get_value(), Config->get_max_gain()), this); + } } else { - cerr << "reset gain using slider pos " << gain_adjustment.get_value() << " to " - << slider_position_to_gain_with_max (gain_adjustment.get_value(), Config->get_max_gain()) - << endl; _amp->set_gain (slider_position_to_gain_with_max (gain_adjustment.get_value(), Config->get_max_gain()), this); } } -- cgit v1.2.3