13
0

fix behavior of Region::mid_thaw() to match pre-nutempo behavior

We no longer have a distinct "position" property, because the "length" property
defines both extent and position. But we must not call ::recompute_at_start()
when the position has not changed, so here we use Region::last_length() to
simulate the position property.
This commit is contained in:
Paul Davis 2022-08-25 15:13:24 -06:00
parent 00a1b7cb24
commit 13d10582f0

View File

@ -999,6 +999,7 @@ Region::trim_to_internal (timepos_t const & pos, timecnt_t const & len)
if (!property_changes_suspended()) {
_last_length = _length;
}
std::cerr << "change len\n";
set_length_internal (nl);
what_changed.add (Properties::length);
}
@ -1402,7 +1403,9 @@ void
Region::mid_thaw (const PropertyChange& what_changed)
{
if (what_changed.contains (Properties::length)) {
recompute_at_start ();
if (length().position() != last_position()) {
recompute_at_start ();
}
recompute_at_end ();
}
}