summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-08-14 16:01:07 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-08-14 16:01:07 +0000
commitbd1d705498a30939712deada370d868664b61a34 (patch)
treeac61b9d406a65b61d8e1ad3a45d51f935c86588e /gtk2_ardour/editor_ops.cc
parent12d1da30d23a3767ab91d7bb83696d3d0668fe31 (diff)
add new editor actions for solo, mute, solo-isolate toggle (of selected tracks) for use by MIDI bindings
git-svn-id: svn://localhost/ardour2/branches/3.0@9990 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc54
1 files changed, 54 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index a47fc95430..29471aa913 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -4755,6 +4755,60 @@ Editor::toggle_record_enable ()
}
}
+void
+Editor::toggle_solo ()
+{
+ bool new_state = false;
+ bool first = true;
+ boost::shared_ptr<RouteList> rl (new RouteList);
+
+ for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
+ RouteTimeAxisView *rtav = dynamic_cast<RouteTimeAxisView *>(*i);
+
+ if (!rtav) {
+ continue;
+ }
+
+ if (first) {
+ new_state = !rtav->route()->soloed ();
+ first = false;
+ }
+
+ rl->push_back (rtav->route());
+ }
+
+ _session->set_solo (rl, new_state, Session::rt_cleanup, true);
+}
+
+void
+Editor::toggle_mute ()
+{
+ bool new_state = false;
+ bool first = true;
+ boost::shared_ptr<RouteList> rl (new RouteList);
+
+ for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
+ RouteTimeAxisView *rtav = dynamic_cast<RouteTimeAxisView *>(*i);
+
+ if (!rtav) {
+ continue;
+ }
+
+ if (first) {
+ new_state = !rtav->route()->soloed ();
+ first = false;
+ }
+
+ rl->push_back (rtav->route());
+ }
+
+ _session->set_mute (rl, new_state, Session::rt_cleanup, true);
+}
+
+void
+Editor::toggle_solo_isolate ()
+{
+}
void
Editor::set_fade_length (bool in)