Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Fix dissolve in slideshow clips broken

BUG: 370337
parent 67eb1aea
...@@ -3359,7 +3359,7 @@ void Bin::showSlideshowWidget(ProjectClip *clip) ...@@ -3359,7 +3359,7 @@ void Bin::showSlideshowWidget(ProjectClip *clip)
properties.insert(QStringLiteral("loop"), QString::number(dia->loop())); properties.insert(QStringLiteral("loop"), QString::number(dia->loop()));
properties.insert(QStringLiteral("crop"), QString::number(dia->crop())); properties.insert(QStringLiteral("crop"), QString::number(dia->crop()));
properties.insert(QStringLiteral("fade"), QString::number(dia->fade())); properties.insert(QStringLiteral("fade"), QString::number(dia->fade()));
properties.insert(QStringLiteral("luma_duration"), dia->lumaDuration()); properties.insert(QStringLiteral("luma_duration"), QString::number(m_doc->getFramePos(dia->lumaDuration())));
properties.insert(QStringLiteral("luma_file"), dia->lumaFile()); properties.insert(QStringLiteral("luma_file"), dia->lumaFile());
properties.insert(QStringLiteral("softness"), QString::number(dia->softness())); properties.insert(QStringLiteral("softness"), QString::number(dia->softness()));
properties.insert(QStringLiteral("animation"), dia->animation()); properties.insert(QStringLiteral("animation"), dia->animation());
......
...@@ -288,9 +288,13 @@ QDomElement ProjectClip::toXml(QDomDocument& document, bool includeMeta) ...@@ -288,9 +288,13 @@ QDomElement ProjectClip::toXml(QDomDocument& document, bool includeMeta)
{ {
if (m_controller) { if (m_controller) {
m_controller->getProducerXML(document, includeMeta); m_controller->getProducerXML(document, includeMeta);
return document.documentElement().firstChildElement(QStringLiteral("producer")); QDomElement prod = document.documentElement().firstChildElement(QStringLiteral("producer"));
if (m_type != Unknown) {
prod.setAttribute(QStringLiteral("type"), (int) m_type);
}
return prod;
} else { } else {
// We only have very basic infos, ike id and url, pass them // We only have very basic infos, like id and url, pass them
QDomElement prod = document.createElement(QStringLiteral("producer")); QDomElement prod = document.createElement(QStringLiteral("producer"));
prod.setAttribute(QStringLiteral("id"), m_id); prod.setAttribute(QStringLiteral("id"), m_id);
EffectsList::setProperty(prod, QStringLiteral("resource"), m_temporaryUrl.path()); EffectsList::setProperty(prod, QStringLiteral("resource"), m_temporaryUrl.path());
...@@ -592,6 +596,7 @@ void ProjectClip::setProperties(QMap <QString, QString> properties, bool refresh ...@@ -592,6 +596,7 @@ void ProjectClip::setProperties(QMap <QString, QString> properties, bool refresh
QMap <QString, QString> passProperties; QMap <QString, QString> passProperties;
bool refreshAnalysis = false; bool refreshAnalysis = false;
bool reload = false; bool reload = false;
bool refreshOnly = true;
// Some properties also need to be passed to track producers // Some properties also need to be passed to track producers
QStringList timelineProperties; QStringList timelineProperties;
if (properties.contains(QLatin1String("templatetext"))) { if (properties.contains(QLatin1String("templatetext"))) {
...@@ -607,6 +612,7 @@ void ProjectClip::setProperties(QMap <QString, QString> properties, bool refresh ...@@ -607,6 +612,7 @@ void ProjectClip::setProperties(QMap <QString, QString> properties, bool refresh
setProducerProperty(i.key(), i.value()); setProducerProperty(i.key(), i.value());
if (m_type == SlideShow && keys.contains(i.key())) { if (m_type == SlideShow && keys.contains(i.key())) {
reload = true; reload = true;
refreshOnly = false;
} }
if (i.key().startsWith(QLatin1String("kdenlive:clipanalysis"))) refreshAnalysis = true; if (i.key().startsWith(QLatin1String("kdenlive:clipanalysis"))) refreshAnalysis = true;
if (timelineProperties.contains(i.key())) { if (timelineProperties.contains(i.key())) {
...@@ -658,7 +664,7 @@ void ProjectClip::setProperties(QMap <QString, QString> properties, bool refresh ...@@ -658,7 +664,7 @@ void ProjectClip::setProperties(QMap <QString, QString> properties, bool refresh
} }
if (reload) { if (reload) {
// producer has changed, refresh monitor and thumbnail // producer has changed, refresh monitor and thumbnail
reloadProducer(true); reloadProducer(refreshOnly);
bin()->refreshClip(m_id); bin()->refreshClip(m_id);
} }
if (!passProperties.isEmpty()) { if (!passProperties.isEmpty()) {
......
...@@ -245,7 +245,7 @@ void ClipCreationDialog::createSlideshowClip(KdenliveDoc *doc, QStringList group ...@@ -245,7 +245,7 @@ void ClipCreationDialog::createSlideshowClip(KdenliveDoc *doc, QStringList group
properties.insert(QStringLiteral("loop"), QString::number(dia->loop())); properties.insert(QStringLiteral("loop"), QString::number(dia->loop()));
properties.insert(QStringLiteral("crop"), QString::number(dia->crop())); properties.insert(QStringLiteral("crop"), QString::number(dia->crop()));
properties.insert(QStringLiteral("fade"), QString::number(dia->fade())); properties.insert(QStringLiteral("fade"), QString::number(dia->fade()));
properties.insert(QStringLiteral("luma_duration"), dia->lumaDuration()); properties.insert(QStringLiteral("luma_duration"), QString::number(doc->getFramePos(dia->lumaDuration())));
properties.insert(QStringLiteral("luma_file"), dia->lumaFile()); properties.insert(QStringLiteral("luma_file"), dia->lumaFile());
properties.insert(QStringLiteral("softness"), QString::number(dia->softness())); properties.insert(QStringLiteral("softness"), QString::number(dia->softness()));
properties.insert(QStringLiteral("animation"), dia->animation()); properties.insert(QStringLiteral("animation"), dia->animation());
......
...@@ -501,7 +501,6 @@ void ProducerQueue::processFileProperties() ...@@ -501,7 +501,6 @@ void ProducerQueue::processFileProperties()
if (frameNumber > 0) producer->seek(frameNumber); if (frameNumber > 0) producer->seek(frameNumber);
duration = duration > 0 ? duration : producer->get_playtime(); duration = duration > 0 ? duration : producer->get_playtime();
//qDebug() << "/////// PRODUCER: " << url.path() << " IS: " << producer->get_playtime(); //qDebug() << "/////// PRODUCER: " << url.path() << " IS: " << producer->get_playtime();
if (type == SlideShow) { if (type == SlideShow) {
int ttl = EffectsList::property(info.xml,QStringLiteral("ttl")).toInt(); int ttl = EffectsList::property(info.xml,QStringLiteral("ttl")).toInt();
QString anim = EffectsList::property(info.xml,QStringLiteral("animation")); QString anim = EffectsList::property(info.xml,QStringLiteral("animation"));
......
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