13
0

Use same time-domain for all drag copied regions

When copying regions from multiple tracks, use the same
time domain for each region (depends on grid).

The primary region position is set the time-domain from
RegionMotionDrag::_last_position replacing the region's
prior time-domain. Other regions should follow suit and not
retain their time-domain.

Fixes: Enable snap-to-grid, select regions on multiple tracks,
ctrl+drag copy them.
This commit is contained in:
Robin Gareus 2023-01-10 22:39:44 +01:00
parent f658a4c0b2
commit d322cfabdc
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1773,9 +1773,10 @@ RegionMoveDrag::finished_copy (bool const changed_position, bool const changed_t
timepos_t where;
if (changed_position && !_x_constrained) {
where = timepos_t (i->view->region()->position().earlier (drag_delta));
where = i->view->region()->position().earlier (drag_delta);
where.set_time_domain (_last_position.time_domain());
} else {
where = timepos_t (i->view->region()->position());
where = i->view->region()->position();
}
/* compute full extent of regions that we're going to insert */