track: reimplemented invalidate cache block

Optimizes working in the timeline by only invalidating cache when necessary.
This commit is contained in:
itsmattkc
2020-01-25 16:38:18 +11:00
parent 7bb8da8d79
commit f5fe87d959
+3 -1
View File
@@ -205,7 +205,9 @@ const QVector<Block *> &TrackOutput::Blocks() const
void TrackOutput::InvalidateCache(const rational &start_range, const rational &end_range, NodeInput *from)
{
Node::InvalidateCache(qMax(start_range, rational(0)), qMin(end_range, track_length()), from);
if (block_invalidate_cache_stack_ == 0) {
Node::InvalidateCache(qMax(start_range, rational(0)), qMin(end_range, track_length()), from);
}
}
void TrackOutput::InsertBlockBefore(Block* block, Block* after)