13
0

fix position of duplicated regions

Several thinkos here but the most important one is that timepos_t::increment() returns
a value, rather than modifying the object
This commit is contained in:
Paul Davis 2022-10-28 14:34:34 -06:00
parent a3795031da
commit c58d052a8e

View File

@ -5266,8 +5266,11 @@ 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));
timepos_t position = end_time + (start_time.distance (r->position()));
position.increment ();
/* end time is an inclusive end; we need to place the
* duplicated region after that.
*/
timepos_t position = end_time.increment();
playlist = (*i)->region()->playlist();