add undo to keymouse set sync position.. possibly the hard way
git-svn-id: svn://localhost/trunk/ardour2@291 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7627d6f377
commit
a88fd62a70
|
@ -864,6 +864,7 @@ class Editor : public PublicEditor
|
|||
void split_region_at (jack_nframes_t);
|
||||
void split_regions_at (jack_nframes_t, AudioRegionSelection&);
|
||||
void crop_region_to_selection ();
|
||||
void set_a_regions_sync_position (ARDOUR::Region&, jack_nframes_t);
|
||||
void set_region_sync_from_edit_cursor ();
|
||||
void remove_region_sync();
|
||||
void align_selection (ARDOUR::RegionPoint, jack_nframes_t position);
|
||||
|
|
|
@ -115,7 +115,7 @@ Editor::kbd_do_set_sync_position (GdkEvent* ev)
|
|||
snap_to (where);
|
||||
|
||||
if (entered_regionview) {
|
||||
entered_regionview->region.set_sync_position (where);
|
||||
set_a_regions_sync_positon (entered_regionview->region, where);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue