ensure cache modified time is accurate

This commit is contained in:
itsmattkc
2021-02-22 00:23:34 +11:00
parent 05cb3b86b8
commit cfbf563b2e
17 changed files with 92 additions and 65 deletions
+7 -2
View File
@@ -274,7 +274,7 @@ void PreviewAutoCacher::ProcessUpdateQueue()
}
graph_update_queue_.clear();
last_update_time_ = QDateTime::currentMSecsSinceEpoch();
UpdateLastSyncedValue();
}
bool PreviewAutoCacher::HasActiveJobs() const
@@ -342,6 +342,11 @@ void PreviewAutoCacher::InsertIntoCopyMap(Node *node, Node *copy)
Node::CopyInputs(node, copy, false);
}
void PreviewAutoCacher::UpdateLastSyncedValue()
{
last_update_time_ = QDateTime::currentMSecsSinceEpoch();
}
void PreviewAutoCacher::SetPlayhead(const rational &playhead)
{
cache_range_ = TimeRange(playhead - Config::Current()[QStringLiteral("DiskCacheBehind")].value<rational>(),
@@ -662,7 +667,7 @@ void PreviewAutoCacher::SetViewerNode(Sequence *viewer_node)
}
}
last_update_time_ = QDateTime::currentMSecsSinceEpoch();
UpdateLastSyncedValue();
// Connect signals for future node additions/deletions
connect(graph, &NodeGraph::NodeAdded, this, &PreviewAutoCacher::NodeAdded);