Commit 1bddf7ca authored by Pushkar Kukde's avatar Pushkar Kukde Committed by Jean-Baptiste Mardelle

Fixed automatic scene split (bug #421772)

parent bdd32223
......@@ -153,8 +153,8 @@ bool SceneSplitJob::commitResult(Fun &undo, Fun &redo)
int lastCut = 0;
QMap<QString, QString> zoneData;
QJsonArray list;
QJsonDocument json(list);
for (const QString &marker : markerData) {
QJsonDocument json;
for (const QString &marker : qAsConst(markerData)) {
int pos = marker.section(QLatin1Char('='), 0, 0).toInt();
if (pos <= lastCut + 1 || pos - lastCut < m_minInterval) {
continue;
......@@ -167,8 +167,10 @@ bool SceneSplitJob::commitResult(Fun &undo, Fun &redo)
lastCut = pos;
ix++;
}
json.setArray(list);
QString dataMap(json.toJson());
if (!json.isEmpty()) {
pCore->projectItemModel()->loadSubClips(m_clipId, QString(json.toJson()), undo, redo);
pCore->projectItemModel()->loadSubClips(m_clipId, dataMap, undo, redo);
}
}
qDebug() << "RESULT of the SCENESPLIT filter:" << result;
......
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