diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2018-03-27 10:17:33 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2018-03-27 10:19:12 -0400 |
commit | 9840f848301aec81241b63b597c871a12cfcf571 (patch) | |
tree | 76ec3099283b8a8fac64254791cc62286fb0aa83 /gtk2_ardour/editor_ops.cc | |
parent | 929cea9ef48948b483ce9013b933e6007156bc66 (diff) |
duplicate (regions) should honor ripple edit mode
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 364dace9b9..d92cbf4b65 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4892,7 +4892,17 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times) samplepos_t const position = end_sample + (r->first_sample() - start_sample + 1); playlist = (*i)->region()->playlist(); playlist->clear_changes (); + + /* ripple first */ + + if (Config->get_edit_mode() == Ripple) { + playlist->ripple (position, (*i)->region()->length() * times, (*i)->region()); + } + + /* now duplicate */ + playlist->duplicate (r, position, gap, times); + _session->add_command(new StatefulDiffCommand (playlist)); c.disconnect (); |