Group-override for faders
authorRobin Gareus <robin@gareus.org>
Fri, 24 Feb 2017 22:40:13 +0000 (23:40 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 24 Feb 2017 22:41:22 +0000 (23:41 +0100)
Tentative solution. Eventually the gain_adjustment should be moved
into the PixFader or SliderController and a dedicated API
should replace  gain_adjustment.signal_value_changed()

gtk2_ardour/gain_meter.cc

index 0a66784a938247df63b67ca29210ae60ddf0b14d..42339267e9a6238dfc320926eb83ed986839a51c 100644 (file)
@@ -581,7 +581,14 @@ GainMeterBase::fader_moved ()
                        value = gain_adjustment.get_value();
                }
 
-               _control->set_value (value, Controllable::UseGroup);
+               // XXX hack allow to override group
+               // (this breaks group'ed  shift+click reset)
+               if (Keyboard::the_keyboard().key_is_down (GDK_Shift_R)
+                               || Keyboard::the_keyboard().key_is_down (GDK_Shift_L)) {
+                       _control->set_value (value, Controllable::NoGroup);
+               } else {
+                       _control->set_value (value, Controllable::UseGroup);
+               }
        }
 
        show_gain ();