From 80c48c76334808fc63fa12e97bae01694b1b7be9 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sat, 25 Jan 2020 17:01:21 +1100 Subject: [PATCH] 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. --- app/node/block/clip/clip.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/node/block/clip/clip.cpp b/app/node/block/clip/clip.cpp index dda9aadb4..f9f4efb38 100644 --- a/app/node/block/clip/clip.cpp +++ b/app/node/block/clip/clip.cpp @@ -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);