Commit 8ec0f2b2 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Merge branch '2004'

parents 689e351a 245e292c
Pipeline #17551 passed with stage
in 21 minutes and 53 seconds
...@@ -1566,8 +1566,10 @@ bool TimelineFunctions::pasteTimelineClips(const std::shared_ptr<TimelineItemMod ...@@ -1566,8 +1566,10 @@ bool TimelineFunctions::pasteTimelineClips(const std::shared_ptr<TimelineItemMod
int out = prod.attribute(QStringLiteral("out")).toInt(); int out = prod.attribute(QStringLiteral("out")).toInt();
int curTrackId = tracksMap.value(prod.attribute(QStringLiteral("track")).toInt()); int curTrackId = tracksMap.value(prod.attribute(QStringLiteral("track")).toInt());
int aTrackId = prod.attribute(QStringLiteral("a_track")).toInt(); int aTrackId = prod.attribute(QStringLiteral("a_track")).toInt();
if (aTrackId > 0) { if (tracksMap.contains(aTrackId)) {
aTrackId = timeline->getTrackPosition(tracksMap.value(aTrackId)); aTrackId = timeline->getTrackPosition(tracksMap.value(aTrackId));
} else {
aTrackId = 0;
} }
int pos = prod.attribute(QStringLiteral("position")).toInt() - offset; int pos = prod.attribute(QStringLiteral("position")).toInt() - offset;
int newId; int newId;
...@@ -1788,9 +1790,15 @@ QDomDocument TimelineFunctions::extractClip(const std::shared_ptr<TimelineItemMo ...@@ -1788,9 +1790,15 @@ QDomDocument TimelineFunctions::extractClip(const std::shared_ptr<TimelineItemMo
effectsList.appendChild(clipEffect); effectsList.appendChild(clipEffect);
clipEffect.setAttribute(QStringLiteral("id"), filterId); clipEffect.setAttribute(QStringLiteral("id"), filterId);
QDomNodeList properties = effect.childNodes(); QDomNodeList properties = effect.childNodes();
if (effect.hasAttribute(QStringLiteral("in"))) {
clipEffect.setAttribute(QStringLiteral("in"), effect.attribute(QStringLiteral("in")));
}
if (effect.hasAttribute(QStringLiteral("out"))) {
clipEffect.setAttribute(QStringLiteral("out"), effect.attribute(QStringLiteral("out")));
}
for (int l = 0; l < properties.count(); ++l) { for (int l = 0; l < properties.count(); ++l) {
QDomElement prop = properties.item(l).toElement(); QDomElement prop = properties.item(l).toElement();
const QString &propName = prop.attribute(QLatin1String("name")); const QString propName = prop.attribute(QLatin1String("name"));
if (propName == QLatin1String("mlt_service") || propName == QLatin1String("kdenlive_id")) { if (propName == QLatin1String("mlt_service") || propName == QLatin1String("kdenlive_id")) {
continue; continue;
} }
...@@ -1801,6 +1809,7 @@ QDomDocument TimelineFunctions::extractClip(const std::shared_ptr<TimelineItemMo ...@@ -1801,6 +1809,7 @@ QDomDocument TimelineFunctions::extractClip(const std::shared_ptr<TimelineItemMo
} }
track++; track++;
} }
track = audioTracks;
if (!isAudio) { if (!isAudio) {
// Compositions // Compositions
QDomNodeList compositions = sourceDoc.elementsByTagName(QLatin1String("transition")); QDomNodeList compositions = sourceDoc.elementsByTagName(QLatin1String("transition"));
...@@ -1819,8 +1828,8 @@ QDomDocument TimelineFunctions::extractClip(const std::shared_ptr<TimelineItemMo ...@@ -1819,8 +1828,8 @@ QDomDocument TimelineFunctions::extractClip(const std::shared_ptr<TimelineItemMo
composition.setAttribute(QLatin1String("in"), in); composition.setAttribute(QLatin1String("in"), in);
composition.setAttribute(QLatin1String("out"), out); composition.setAttribute(QLatin1String("out"), out);
composition.setAttribute(QLatin1String("composition"), compoId); composition.setAttribute(QLatin1String("composition"), compoId);
composition.setAttribute(QLatin1String("a_track"), Xml::getXmlProperty(currentCompo, QLatin1String("a_track")).toInt() - 1); composition.setAttribute(QLatin1String("a_track"), track + Xml::getXmlProperty(currentCompo, QLatin1String("a_track")).toInt());
composition.setAttribute(QLatin1String("track"), Xml::getXmlProperty(currentCompo, QLatin1String("b_track")).toInt() - 1); composition.setAttribute(QLatin1String("track"), track + Xml::getXmlProperty(currentCompo, QLatin1String("b_track")).toInt());
QDomNodeList properties = currentCompo.childNodes(); QDomNodeList properties = currentCompo.childNodes();
for (int l = 0; l < properties.count(); ++l) { for (int l = 0; l < properties.count(); ++l) {
QDomElement prop = properties.item(l).toElement(); QDomElement prop = properties.item(l).toElement();
......
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