3 monitor tweaks for the_CLA. shift+click to default, and new preset vals
authorBen Loftis <ben@harrisonconsoles.com>
Tue, 22 Jul 2014 21:05:51 +0000 (16:05 -0500)
committerBen Loftis <ben@harrisonconsoles.com>
Tue, 22 Jul 2014 21:05:51 +0000 (16:05 -0500)
gtk2_ardour/ardour_knob.cc
gtk2_ardour/monitor_section.cc
libs/pbd/pbd/controllable.h

index ade83e504cb3b8193191012163b914bb6f50518d..7021cb9df1807e4a7c048df58adf2c32c7a4f1c3 100644 (file)
@@ -335,6 +335,13 @@ ArdourKnob::on_button_press_event (GdkEventButton *ev)
 bool
 ArdourKnob::on_button_release_event (GdkEventButton *ev)
 {
+       if ( (_grabbed_y == ev->y) && Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {  //no move, shift-click sets to default
+               boost::shared_ptr<PBD::Controllable> c = binding_proxy.get_controllable();
+               if (!c) return false;
+               c->set_value (c->normal());
+        return true;
+       }
+
        _grabbed = false;
        unset_active_state ();
 
index 3f7ebfaa6e47f7b71c6170a37eb508d25287969f..4b285defeacbcb21d0855240e6375368aec91817 100644 (file)
@@ -192,6 +192,7 @@ MonitorSection::MonitorSection (Session* s)
                solo_cut_display->add_controllable_preset("-6 dB", -6.0);
                solo_cut_display->add_controllable_preset("-12 dB", -12.0);
                solo_cut_display->add_controllable_preset("-20 dB", -20.0);
+               solo_cut_display->add_controllable_preset("OFF", -1200.0);
        
         spin_label = manage (new Label (_("SiP Cut")));
         spin_packer = manage (new VBox);
@@ -218,7 +219,6 @@ MonitorSection::MonitorSection (Session* s)
                dim_display->add_controllable_preset("-6 dB", -6.0);
                dim_display->add_controllable_preset("-12 dB", -12.0);
                dim_display->add_controllable_preset("-20 dB", -20.0);
-               dim_display->add_controllable_preset("-30 dB", -30.0);
         
         HBox* dim_packer = manage (new HBox);
         dim_packer->show ();
index fb8f79db091f513a398229f1fd05b7599739effd..fbe10f384165035f16b5a4421573126e1f67691e 100644 (file)
@@ -103,6 +103,7 @@ class LIBPBD_API Controllable : public PBD::StatefulDestructible {
 
         virtual double lower() const { return 0.0; }
         virtual double upper() const { return 1.0; }
+        virtual double normal() const { return 0.0; }  //the default value
 
        Flag flags() const { return _flags; }
        void set_flags (Flag f);