diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-01-23 20:39:58 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-01-23 20:39:58 +0000 |
commit | a88fd62a706a36569762577c5aad101856d0d606 (patch) | |
tree | b4819c7018d9c9457f2ef4a9e80c48278b3de1fe /gtk2_ardour/editor_ops.cc | |
parent | 7627d6f377c73756c56f9c4734f278b72854f40f (diff) |
add undo to keymouse set sync position.. possibly the hard way
git-svn-id: svn://localhost/trunk/ardour2@291 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index a5c04826c6..bebe3c7cf0 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2707,7 +2707,22 @@ Editor::region_fill_selection () commit_reversible_command (); } - + +void +Editor::set_a_regions_sync_position (Region& region, jack_nframes_t position) +{ + + if (!region.covers (position)) { + error << _("Programming error. that region doesn't cover that position") << __FILE__ << " +" << __LINE__ << endmsg; + return; + } + begin_reversible_command (_("set region sync position")); + session->add_undo (region.playlist()->get_memento()); + region.set_sync_position (position); + session->add_redo_no_execute (region.playlist()->get_memento()); + commit_reversible_command (); +} + void Editor::set_region_sync_from_edit_cursor () { |