summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_markers.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2015-03-13 16:24:55 -0500
committerBen Loftis <ben@harrisonconsoles.com>2015-03-13 16:25:59 -0500
commitffd32ae5e184b42aa9f38903f146751b36b87092 (patch)
tree5a8423132b80e8a39e46900ced752635de1b472d /gtk2_ardour/editor_markers.cc
parent94e36450d2bb7fad5f27d9313035f6b4535931b8 (diff)
Right-clicking on the Loop/Punch ruler should "Do Something".
Diffstat (limited to 'gtk2_ardour/editor_markers.cc')
-rw-r--r--gtk2_ardour/editor_markers.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index d982de3a32..78f806310e 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -674,6 +674,38 @@ Editor::mouse_add_new_marker (framepos_t where, bool is_cd, bool is_xrun)
}
void
+Editor::mouse_add_new_loop (framepos_t where)
+{
+ if (!_session) {
+ return;
+ }
+
+ /* Make this marker 1/8th of the visible area of the session so that
+ it's reasonably easy to manipulate after creation.
+ */
+
+ framepos_t const end = where + current_page_samples() / 8;
+
+ set_loop_range (where, end, _("set loop range"));
+}
+
+void
+Editor::mouse_add_new_punch (framepos_t where)
+{
+ if (!_session) {
+ return;
+ }
+
+ /* Make this marker 1/8th of the visible area of the session so that
+ it's reasonably easy to manipulate after creation.
+ */
+
+ framepos_t const end = where + current_page_samples() / 8;
+
+ set_punch_range (where, end, _("set punch range"));
+}
+
+void
Editor::mouse_add_new_range (framepos_t where)
{
if (!_session) {