diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index b99e142ada..8c2f2a36b0 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -764,15 +764,11 @@ Region::set_position_internal (timepos_t const & pos) */ if (td != _length.val().position().time_domain()) { - switch (td) { - case Temporal::AudioTime: - _length = timecnt_t::from_superclock (superclock_t (_length.val().distance()), timepos_t::from_superclock (pos.superclocks())); - break; - default: - _length = timecnt_t::from_ticks (int64_t (_length.val().distance()), timepos_t::from_ticks (pos.ticks())); - break; - } - } else { + timecnt_t l = _length.val(); + l.set_position (pos); + l.set_time_domain (td); + _length = l; + } else { /* time domain of position not changing */ _length = timecnt_t (_length.val().distance(), pos); }