From 0bd1d9bc1780e9b1c6000fe8b4e728a3c6ac5b23 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 6 Jul 2022 01:32:57 +0200 Subject: [PATCH] Fix layered region non-playing shade (timepos_t API) Before nutempo, ::find_next_region_boundary() used to return -1 when no boundary was found (now timepos_t::max is returned). timepos_t::increment() returns the incremented value, not increments the variable itself. --- gtk2_ardour/region_view.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 027441a402..5fd71c52dc 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -1008,7 +1008,7 @@ RegionView::update_coverage_frame (LayerDisplay d) while (t < end) { - t.increment(); + t = t.increment (); /* is this region is on top at time t? */ bool const new_me = (pl->top_unmuted_region_at (t) == _region); @@ -1033,14 +1033,12 @@ RegionView::update_coverage_frame (LayerDisplay d) } } t = pl->find_next_region_boundary (t, 1); - if (t.is_negative()) { + if (t == timepos_t::max (t.time_domain())) { break; } me = new_me; } - t = pl->find_next_region_boundary (t, 1); - if (cr) { /* finish off the last rectangle */ cr->set_x1 (trackview.editor().duration_to_pixels (position.distance (end)));