summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-02-17 22:41:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-02-17 22:41:34 +0000
commit15936ab6d9569838024a2d83145052d1e495b2ed (patch)
treec0ad3c4099a3fad330eb7925fd44a6cd129844a4 /gtk2_ardour/editor_ops.cc
parentdf8b8d7ba640096fb9a1e690601b8deeff118c30 (diff)
a boatload of changes and fixes related to SAE menu redesign (several new operations, things set up as actions for use in the main menu; fix Editor::snap_to() since it was really severely broken for general use
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3079 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc44
1 files changed, 44 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 7959ae1308..84b2136498 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -2784,6 +2784,24 @@ Editor::separate_region_from_selection ()
}
void
+Editor::separate_region_from_punch ()
+{
+ Location* loc = session->locations()->auto_punch_location();
+ if (loc) {
+ separate_regions_using_location (*loc);
+ }
+}
+
+void
+Editor::separate_region_from_loop ()
+{
+ Location* loc = session->locations()->auto_loop_location();
+ if (loc) {
+ separate_regions_using_location (*loc);
+ }
+}
+
+void
Editor::separate_regions_using_location (Location& loc)
{
if (loc.is_mark()) {
@@ -5418,3 +5436,29 @@ Editor::tab_to_transient (bool forward)
}
}
}
+
+void
+Editor::playhead_forward_to_grid ()
+{
+ if (!session) return;
+ nframes64_t pos = playhead_cursor->current_frame;
+ if (pos < max_frames) {
+ pos++;
+ snap_to_internal (pos, 1, false);
+ session->request_locate (pos);
+ }
+}
+
+
+void
+Editor::playhead_backward_to_grid ()
+{
+ if (!session) return;
+ nframes64_t pos = playhead_cursor->current_frame;
+ if (pos > 1) {
+ pos--;
+ snap_to_internal (pos, -1, false);
+ session->request_locate (pos);
+ }
+}
+