diff options
author | André Nusser <andre.nusser@googlemail.com> | 2015-10-28 22:09:39 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-11-04 17:50:12 -0500 |
commit | 2cc707e88fc745af8e89ad7ddacc50867201d128 (patch) | |
tree | 5fdb65ffb72cf6af5fe98da75d319dc7bd88d019 /gtk2_ardour | |
parent | f048eb7d026e08894b3aa92a7e1dcfa3aeb3aa74 (diff) |
Fix fencepost error in duplicate_some_regions. Adapt start position.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 6c48fa4e4f..d749e23914 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4775,7 +4775,7 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times) framepos_t const start_frame = regions.start (); framepos_t const end_frame = regions.end_frame (); - framecnt_t const gap = end_frame - start_frame; + framecnt_t const gap = end_frame - start_frame + 1; begin_reversible_command (Operations::duplicate_region); @@ -4790,7 +4790,7 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times) latest_regionviews.clear (); sigc::connection c = rtv->view()->RegionViewAdded.connect (sigc::mem_fun(*this, &Editor::collect_new_region_view)); - framepos_t const position = end_frame + (r->first_frame() - start_frame); + framepos_t const position = end_frame + (r->first_frame() - start_frame + 1); playlist = (*i)->region()->playlist(); playlist->clear_changes (); playlist->duplicate (r, position, gap, times); @@ -4841,7 +4841,7 @@ Editor::duplicate_selection (float times) } else { end = selection->time.end_frame(); } - playlist->duplicate (*ri, end, times); + playlist->duplicate (*ri, end + 1, times); if (!in_command) { begin_reversible_command (_("duplicate selection")); |