13
0

Fix egregious playlist copy+paste thinko

* when you copy a Range into a playlist, the playlist's 'timeline' should
 begin at the start of the selected Range.  Regions should retain the
 offset they had from the Range's start.
This commit is contained in:
Ben Loftis 2022-05-13 12:03:49 -05:00
parent 2a2b2c8b36
commit a899136cae

View File

@ -237,13 +237,13 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, timepos_t const & s
case Temporal::OverlapInternal:
offset = region->position().distance (start);
position = timepos_t (start.time_domain());
position = timepos_t(start.time_domain());
len = timecnt_t (cnt);
break;
case Temporal::OverlapStart:
offset = timecnt_t (start.time_domain());
position = region->source_position();
position = start.distance(region->position());
len = region->position().distance (end);
break;
@ -255,7 +255,7 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, timepos_t const & s
case Temporal::OverlapExternal:
offset = timecnt_t (start.time_domain());
position = region->source_position();
position = start.distance(region->position());
len = region->length();
break;
}