block: fixed bug that broke single frame updating from a slider

Optimization that only invalidates cache when the user has stopped sliding to
keep the UI responsive.
This commit is contained in:
itsmattkc
2020-01-25 17:01:21 +11:00
parent f5fe87d959
commit 80c48c7633
+6 -4
View File
@@ -64,11 +64,13 @@ void ClipBlock::InvalidateCache(const rational &start_range, const rational &end
rational start = MediaToSequenceTime(start_range);
rational end = MediaToSequenceTime(end_range);
// Limit cache invalidation to clip lengths
start = qMax(start, in());
end = qMin(end, out());
if (!(end < in() || start > out())) {
// Limit cache invalidation to clip lengths
start = qMax(start, in());
end = qMin(end, out());
Node::InvalidateCache(start, end, from);
Node::InvalidateCache(start, end, from);
}
} else {
// Otherwise, pass signal along normally
Node::InvalidateCache(start_range, end_range, from);