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.
This commit is contained in:
Robin Gareus 2022-07-06 01:32:57 +02:00
parent 0d70be3a05
commit 0bd1d9bc17
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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)));