Fix copy/paste of clip with negative speed

parent d48ce4a9
Pipeline #6356 passed with stage
in 20 minutes and 49 seconds
......@@ -1408,6 +1408,12 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
in = 0;
timeline->m_allClips[newId]->m_producer->set("length", out + 1);
}
if (speed < 0) {
// on negative speed clips, in/out are inverted
int length = out - in;
in = timeline->m_allClips[newId]->getMaxDuration() - out;
out = in + length;
}
timeline->m_allClips[newId]->setInOut(in, out);
int targetId = prod.attribute(QStringLiteral("id")).toInt();
correspondingIds[targetId] = newId;
......
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