diff --git a/gtk2_ardour/mixer.bindings b/gtk2_ardour/mixer.bindings index e6af4cf3ce..0eb9bfc878 100644 --- a/gtk2_ardour/mixer.bindings +++ b/gtk2_ardour/mixer.bindings @@ -18,5 +18,6 @@ + diff --git a/gtk2_ardour/mixer_actor.cc b/gtk2_ardour/mixer_actor.cc index 5cc207d509..ec6f8e40c9 100644 --- a/gtk2_ardour/mixer_actor.cc +++ b/gtk2_ardour/mixer_actor.cc @@ -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)); diff --git a/gtk2_ardour/mixer_actor.h b/gtk2_ardour/mixer_actor.h index c1a1afec6e..27fa61e905 100644 --- a/gtk2_ardour/mixer_actor.h +++ b/gtk2_ardour/mixer_actor.h @@ -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 */ diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 77f5f45a56..807de6baa4 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -412,6 +412,16 @@ Mixer_UI::deselect_all_strip_processors () } } +void +Mixer_UI::select_none () +{ + for (list::iterator i = strips.begin(); i != strips.end(); ++i) { + (*i)->set_selected(false); + } + + deselect_all_strip_processors(); +} + void Mixer_UI::delete_processors () { diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index 622cbd9f0d..4ab48ffd31 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -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 ();