cache: improved code pathways for cache
Viewers are now more aware of each other and can pause each others' cache tasks when one of them plays, as well as wait for other viewers' cache tasks to finish before starting their own.
This commit is contained in:
+8
-1
@@ -1136,9 +1136,16 @@ void Core::CacheActiveSequence(bool in_out_only)
|
||||
in_out_only);
|
||||
|
||||
// Stop any current auto-cache tasks
|
||||
ViewerWidget::StopAllBackgroundCacheTasks();
|
||||
ViewerWidget::StopAllBackgroundCacheTasks(true);
|
||||
ViewerWidget::SetBackgroundCacheTask(task);
|
||||
|
||||
TaskDialog* dialog = new TaskDialog(task, tr("Caching Sequence"), main_window_);
|
||||
|
||||
connect(dialog,
|
||||
&TaskDialog::TaskSucceeded,
|
||||
this,
|
||||
[] { ViewerWidget::SetBackgroundCacheTask(nullptr); });
|
||||
|
||||
dialog->open();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user