summaryrefslogtreecommitdiff
path: root/libs/surfaces/control_protocol
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2017-03-19 23:09:45 -0700
committerLen Ovens <len@ovenwerks.net>2017-03-19 23:09:45 -0700
commitf69808b372f6963a1a7bb8be78b9302ea842817d (patch)
tree1bb6167fe4de4e91c18a2d91acbb8b2548c9989a /libs/surfaces/control_protocol
parente307094af33ccf19ea152dd4870011fe9da9be74 (diff)
BasicUI moved toggle_click,toggle_roll and stop_forget from menu action to session calls
Diffstat (limited to 'libs/surfaces/control_protocol')
-rw-r--r--libs/surfaces/control_protocol/basic_ui.cc27
1 files changed, 23 insertions, 4 deletions
diff --git a/libs/surfaces/control_protocol/basic_ui.cc b/libs/surfaces/control_protocol/basic_ui.cc
index 561c4dcae2..6acbdd326b 100644
--- a/libs/surfaces/control_protocol/basic_ui.cc
+++ b/libs/surfaces/control_protocol/basic_ui.cc
@@ -461,13 +461,32 @@ BasicUI::midi_panic ()
session->midi_panic ();
}
+void
+BasicUI::toggle_click ()
+{
+ bool state = !Config->get_clicking();
+ Config->set_clicking (state);
+}
+
+void
+BasicUI::toggle_roll ()
+{
+ if (session->transport_rolling()) {
+ transport_stop ();
+ } else {
+ transport_play (false);
+ }
+}
+
+void
+BasicUI::stop_forget ()
+{
+ session->request_stop (true, true);
+}
+
void BasicUI::mark_in () { access_action("Common/start-range-from-playhead"); }
void BasicUI::mark_out () { access_action("Common/finish-range-from-playhead"); }
-void BasicUI::toggle_click () { access_action("Transport/ToggleClick"); }
-void BasicUI::toggle_roll () { access_action("Transport/ToggleRoll"); }
-void BasicUI::stop_forget () { access_action("Transport/ToggleRollForgetCapture"); }
-
void BasicUI::set_punch_range () { access_action("Common/set-punch-from-edit-range"); }
void BasicUI::set_loop_range () { access_action("Common/set-loop-from-edit-range"); }
void BasicUI::set_session_range () { access_action("Common/set-session-from-edit-range"); }