Mixer page: ESC should deselect all mixer strips and processors
authorBen Loftis <ben@harrisonconsoles.com>
Mon, 28 Jul 2014 16:35:41 +0000 (11:35 -0500)
committerBen Loftis <ben@harrisonconsoles.com>
Mon, 28 Jul 2014 16:35:41 +0000 (11:35 -0500)
gtk2_ardour/mixer.bindings
gtk2_ardour/mixer_actor.cc
gtk2_ardour/mixer_actor.h
gtk2_ardour/mixer_ui.cc
gtk2_ardour/mixer_ui.h

index e6af4cf3ce216fbb5cdd6629473fec6a7d04598b..0eb9bfc8784963dc1fc72e56a6142d81f6064e74 100644 (file)
@@ -18,5 +18,6 @@
      <Binding key="Return" action="Mixer/toggle-processors"/>
      <Binding key="Primary-a" action="Mixer/select-all-processors"/>
      <Binding key="Slash" action="Mixer/ab-plugins"/>
+     <Binding key="Escape" action="Mixer/select-none"/>
   </Press>
 </Bindings>
index 5cc207d509cd8e23c8a24206433b810db998b404..ec6f8e40c9533d827d3c7dc8c4316d25c8af32bb 100644 (file)
@@ -67,7 +67,7 @@ MixerActor::register_actions ()
        myactions.register_action ("Mixer", "select-all-processors", _("Select All (visible) Processors"), sigc::mem_fun (*this, &MixerActor::select_all_processors));
        myactions.register_action ("Mixer", "toggle-processors", _("Toggle Selected Processors"), sigc::mem_fun (*this, &MixerActor::toggle_processors));
        myactions.register_action ("Mixer", "ab-plugins", _("Toggle Selected Plugins"), sigc::mem_fun (*this, &MixerActor::ab_plugins));
-
+       myactions.register_action ("Mixer", "select-none", _("Deselect all srips and processors"), sigc::mem_fun (*this, &MixerActor::select_none));
 
        myactions.register_action ("Mixer", "scroll-left", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_left));
        myactions.register_action ("Mixer", "scroll-right", _("Scroll Mixer Window to the left"), sigc::mem_fun (*this, &MixerActor::scroll_right));
index c1a1afec6e1ab9e02db7e8928c081e9aa3df62ae..27fa61e90518e996bd3cd145e48bf74145ed7d1e 100644 (file)
@@ -66,6 +66,9 @@ class MixerActor : virtual public sigc::trackable
        //BUT... note that we have used mixerstrip's "Enter" to enforce the rule that only one strip will have an active selection
        virtual void delete_processors () = 0;
 
+       virtual void select_none () = 0;
+
+
         /* these actions need access to a Session, do defer to
           a derived class
        */
index 77f5f45a5601f1547c45fc3437c8a9ed35b236bc..807de6baa4a8741fc8a7b39cc7e2f5278cb974d2 100644 (file)
@@ -412,6 +412,16 @@ Mixer_UI::deselect_all_strip_processors ()
        }
 }
 
+void
+Mixer_UI::select_none ()
+{
+       for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
+               (*i)->set_selected(false);
+       }
+       
+       deselect_all_strip_processors();
+}
+
 void
 Mixer_UI::delete_processors ()
 {
index 622cbd9f0d5325f9a71131f6ba996f8466f09990..4ab48ffd3135c708bf00021cf66c7e4b325736aa 100644 (file)
@@ -90,6 +90,8 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
        void deselect_all_strip_processors();
        void delete_processors();
 
+       void select_none ();
+
   protected:
        void set_route_targets_for_operation ();