revert inadvertent broken changes in rev 9748 that broke route group gain control
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 23 Jun 2011 00:05:25 +0000 (00:05 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 23 Jun 2011 00:05:25 +0000 (00:05 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9763 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/gain_meter.cc

index b671d5674a1bbd1ae0faa55128c843c4ca53b388..33688fb339f7645fc551e21258907ff2d3722b62 100644 (file)
@@ -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);
                }
        }