From ffd32ae5e184b42aa9f38903f146751b36b87092 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Fri, 13 Mar 2015 16:24:55 -0500 Subject: Right-clicking on the Loop/Punch ruler should "Do Something". --- gtk2_ardour/editor_markers.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'gtk2_ardour/editor_markers.cc') 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 @@ -673,6 +673,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) { -- cgit v1.2.3