summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2015-09-20 22:22:39 +0200
committerRobin Gareus <robin@gareus.org>2015-09-20 22:22:39 +0200
commit6a248b61f07c7ff73faac21d8bb4934a22b5250e (patch)
tree363413bf374d23a073adfd416a2d8a671a724e36 /gtk2_ardour
parent7b4aa97145b12695fc2948d5d45938cf7fcd86b0 (diff)
fix duplicating multiple selected regions - fixes #6202
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_ops.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 572cbe3981..cc67e02ee8 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -4792,6 +4792,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;
begin_reversible_command (Operations::duplicate_region);
@@ -4806,9 +4807,10 @@ 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);
playlist = (*i)->region()->playlist();
playlist->clear_changes ();
- playlist->duplicate (r, end_frame + (r->first_frame() - start_frame), times);
+ playlist->duplicate (r, position, gap, times);
_session->add_command(new StatefulDiffCommand (playlist));
c.disconnect ();