diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-11-13 02:19:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-11-13 02:19:04 +0000 |
commit | 3fa84d0caa2fb74471619cff2e44f5db3f0a12c6 (patch) | |
tree | 55159b5ad4afd54b86601ee7b922186a9517f54d /gtk2_ardour/mixer_ui.cc | |
parent | cf55921aea8adec135535419febb8bbd0803f008 (diff) |
add alt-i as a binding in both the editor and mixer windows to toggle the state of MIDI input on the selected track(s); in the mixer this will also operate on the strip under the mouse. fixes #4838
git-svn-id: svn://localhost/ardour2/branches/3.0@13475 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 468cdf2244..18ad28d774 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -38,6 +38,7 @@ #include <gtkmm2ext/window_title.h> #include "ardour/debug.h" +#include "ardour/midi_track.h" #include "ardour/plugin_manager.h" #include "ardour/route_group.h" #include "ardour/session.h" @@ -1888,7 +1889,7 @@ Mixer_UI::set_route_targets_for_operation () return; } - /* try to get mixer strip at mouse */ + /* nothing selected ... try to get mixer strip at mouse */ int x, y; get_pointer (x, y); @@ -1908,3 +1909,23 @@ Mixer_UI::monitor_section_going_away () _monitor_section->set_session (0); } } + +void +Mixer_UI::toggle_midi_input_active (bool flip_others) +{ + boost::shared_ptr<RouteList> rl (new RouteList); + bool onoff; + + set_route_targets_for_operation (); + + for (RouteUISelection::iterator r = _route_targets.begin(); r != _route_targets.end(); ++r) { + boost::shared_ptr<MidiTrack> mt = (*r)->midi_track(); + + if (mt) { + rl->push_back ((*r)->route()); + onoff = !mt->input_active(); + } + } + + _session->set_exclusive_input_active (rl, onoff, flip_others); +} |