mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
fix duplicating multiple selected regions - fixes #6202
This commit is contained in:
parent
7b4aa97145
commit
6a248b61f0
3 changed files with 12 additions and 2 deletions
|
|
@ -140,6 +140,7 @@ public:
|
|||
void shift (framepos_t at, frameoffset_t distance, bool move_intersected, bool ignore_music_glue);
|
||||
void partition (framepos_t start, framepos_t end, bool cut = false);
|
||||
void duplicate (boost::shared_ptr<Region>, framepos_t position, float times);
|
||||
void duplicate (boost::shared_ptr<Region>, framepos_t position, framecnt_t gap, float times);
|
||||
void nudge_after (framepos_t start, framecnt_t distance, bool forwards);
|
||||
boost::shared_ptr<Region> combine (const RegionList&);
|
||||
void uncombine (boost::shared_ptr<Region>);
|
||||
|
|
|
|||
|
|
@ -1244,6 +1244,13 @@ Playlist::flush_notifications (bool from_undo)
|
|||
|
||||
void
|
||||
Playlist::duplicate (boost::shared_ptr<Region> region, framepos_t position, float times)
|
||||
{
|
||||
duplicate(region, position, region->length(), times);
|
||||
}
|
||||
|
||||
/** @param gap from the beginning of the region to the next beginning */
|
||||
void
|
||||
Playlist::duplicate (boost::shared_ptr<Region> region, framepos_t position, framecnt_t gap, float times)
|
||||
{
|
||||
times = fabs (times);
|
||||
|
||||
|
|
@ -1255,7 +1262,7 @@ Playlist::flush_notifications (bool from_undo)
|
|||
boost::shared_ptr<Region> copy = RegionFactory::create (region, true);
|
||||
add_region_internal (copy, pos);
|
||||
set_layer (copy, DBL_MAX);
|
||||
pos += region->length();
|
||||
pos += gap;
|
||||
}
|
||||
|
||||
if (floor (times) != times) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue