Fix scroll-wheel on mixer-sliders
authorRobin Gareus <robin@gareus.org>
Fri, 3 Nov 2017 14:55:33 +0000 (15:55 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 3 Nov 2017 14:55:33 +0000 (15:55 +0100)
74c986534b changes the semantics of fader-flags:
NoVerticalScroll  was "ignore vertical scroll for horizontal faders".
Now the flag ignores all vertical scrolling.

gtk2_ardour/gain_meter.cc

index edb1217911e28fd1a64382b5d4ff0da3f3ab661c..41323acf19b46fa0a3e3f9a60780d7b009f0d07e 100644 (file)
@@ -113,8 +113,10 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
 
        if (horizontal) {
                gain_slider = manage (new HSliderController (&gain_adjustment, boost::shared_ptr<PBD::Controllable>(), fader_length, fader_girth));
+               gain_slider->set_tweaks (ArdourFader::Tweaks(ArdourFader::NoButtonForward | ArdourFader::NoVerticalScroll));
        } else {
                gain_slider = manage (new VSliderController (&gain_adjustment, boost::shared_ptr<PBD::Controllable>(), fader_length, fader_girth));
+               gain_slider->set_tweaks (ArdourFader::NoButtonForward);
        }
 
        level_meter = new LevelMeterHBox(_session);
@@ -123,7 +125,6 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
        meter_metric_area.signal_button_press_event().connect (sigc::mem_fun (*this, &GainMeterBase::level_meter_button_press));
        meter_metric_area.add_events (Gdk::BUTTON_PRESS_MASK);
 
-       gain_slider->set_tweaks (ArdourFader::Tweaks(ArdourFader::NoButtonForward | ArdourFader::NoVerticalScroll));
        gain_slider->StartGesture.connect (sigc::mem_fun (*this, &GainMeter::amp_start_touch));
        gain_slider->StopGesture.connect (sigc::mem_fun (*this, &GainMeter::amp_stop_touch));
        gain_slider->set_name ("GainFader");