Commit cd594fe7 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix audio thumbs not created after profile change.

Related to #1276
parent 03e27c0a
Pipeline #116471 passed with stage
in 6 minutes and 27 seconds
......@@ -4333,11 +4333,10 @@ void Bin::reloadAllProducers(bool reloadThumbs)
clip->discardAudioThumb();
// We need to set a temporary id before all outdated producers are replaced;
//int jobId = pCore->jobManager()->startJob<LoadJob>({clip->clipId()}, -1, QString(), xml);
ClipLoadTask::start({ObjectType::BinClip,clip->clipId().toInt()}, xml, false, -1, -1, this);
if (reloadThumbs) {
ThumbnailCache::get()->invalidateThumbsForClip(clip->clipId());
}
//pCore->jobManager()->startJob<ThumbJob>({clip->clipId()}, jobId, QString(), -1, true, true);
ClipLoadTask::start({ObjectType::BinClip,clip->clipId().toInt()}, xml, false, -1, -1, this);
}
}
}
......@@ -4351,7 +4350,7 @@ void Bin::checkAudioThumbs()
for (const auto &clip : qAsConst(clipList)) {
ClipType::ProducerType type = clip->clipType();
if (type == ClipType::AV || type == ClipType::Audio || type == ClipType::Playlist || type == ClipType::Unknown) {
AudioLevelsTask::start({ObjectType::BinClip, clip->clipId().toInt()}, this, false);
AudioLevelsTask::start({ObjectType::BinClip, clip->clipId().toInt()}, clip.get(), false);
}
}
}
......
......@@ -1489,7 +1489,7 @@ void KdenliveDoc::switchProfile(ProfileParam* pf)
pCore->taskManager.slotCancelJobs();
KdenliveSettings::setDefault_profile(profile->path());
pCore->setCurrentProfile(profile->path());
updateProjectProfile(true);
updateProjectProfile(true, true);
emit docModified(true);
return;
case KMessageBox::No:
......@@ -1523,7 +1523,7 @@ void KdenliveDoc::switchProfile(ProfileParam* pf)
// Discard all current jobs
pCore->taskManager.slotCancelJobs();
pCore->setCurrentProfile(profilePath);
updateProjectProfile(true);
updateProjectProfile(true, true);
emit docModified(true);
}
}
......
......@@ -235,7 +235,7 @@ void AudioLevelsTask::run()
QMetaObject::invokeMethod(m_object, "updateAudioThumbnail", Q_ARG(bool, false));
}
}
if (!audioCreated) {
if (!audioCreated && !m_isCanceled) {
// Audio was cached, ensure the bin thumbnail is loaded
QMetaObject::invokeMethod(m_object, "updateAudioThumbnail", Q_ARG(bool, true));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment