Commit d7d03e89 authored by David Lerch's avatar David Lerch Committed by Méven Car
Browse files

Thumbnail: Set sequenceIndexWraparoundPoint AFTER calling ThumbSequenceCreator::create()

The call to create() itself might modify it, so we can't do it before.
parent 9d7f5409
......@@ -238,8 +238,6 @@ void ThumbnailProtocol::get(const QUrl &url)
if (sequenceCreator) {
sequenceCreator->setSequenceIndex(sequenceIndex());
const float wp = sequenceCreator->sequenceIndexWraparoundPoint();
setMetaData("sequenceIndexWraparoundPoint", QString().setNum(wp));
setMetaData("handlesSequences", QStringLiteral("1"));
}
......@@ -247,6 +245,12 @@ void ThumbnailProtocol::get(const QUrl &url)
error(KIO::ERR_INTERNAL, i18n("Cannot create thumbnail for %1", info.canonicalFilePath()));
return;
}
if (sequenceCreator) {
// We MUST do this after calling create(), because the create() call itself might change it.
const float wp = sequenceCreator->sequenceIndexWraparoundPoint();
setMetaData("sequenceIndexWraparoundPoint", QString().setNum(wp));
}
}
}
......
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