Commit 6c52d311 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix paste clip broken until close/repoen app if trying to paste an invalid...

Fix paste clip broken until close/repoen app if trying to paste an invalid clip (missing of playlist with different fps).
Might be related to #1511
parent fd5b4436
......@@ -483,6 +483,7 @@ void ClipLoadTask::run()
QMetaObject::invokeMethod(pCore.get(), "displayBinMessage", Qt::QueuedConnection,
Q_ARG(QString, m_errorMessage.isEmpty() ? i18n("Cannot open file %1", resource) : m_errorMessage),
Q_ARG(int, int(KMessageWidget::Warning)));
emit taskDone();
abort();
return;
}
......@@ -511,6 +512,7 @@ void ClipLoadTask::run()
if (pCore->bin()->shouldCheckProfile) {
pCore->bin()->shouldCheckProfile = false;
}
emit taskDone();
abort();
return;
}
......
......@@ -1919,6 +1919,11 @@ bool TimelineFunctions::pasteTimelineClips(const std::shared_ptr<TimelineItemMod
// Map id
originalId = mappedIds.value(originalId);
}
if (!pCore->projectItemModel()->hasClip(originalId)) {
// Clip import was not successful, continue
pCore->displayMessage(i18n("All clips were not successfully copied"), ErrorMessage, 500);
continue;
}
int in = prod.attribute(QStringLiteral("in")).toInt();
int out = prod.attribute(QStringLiteral("out")).toInt();
int curTrackId = tracksMap.value(prod.attribute(QStringLiteral("track")).toInt());
......
Supports Markdown
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