Fix Region Gain freehand draw offset for regions with start offset

This commit is contained in:
Robin Gareus
2023-10-07 17:55:39 +02:00
parent 31730794be
commit b962addc8c

View File

@@ -1858,5 +1858,7 @@ AudioRegionView::parameter_changed (string const & p)
MergeableLine*
AudioRegionView::make_merger ()
{
return new MergeableLine (gain_line, std::shared_ptr<AutomationControl>(), boost::bind (&Region::absolute_time_to_region_time, _region, _1), nullptr, nullptr);
return new MergeableLine (gain_line, std::shared_ptr<AutomationControl>(),
[this](timepos_t const& t) { return timepos_t (_region->position().distance (t)); },
nullptr, nullptr);
}