Commit 978fb8e5 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix tests

parent 03ccdcdd
......@@ -336,6 +336,18 @@ Monitor *Core::getMonitor(int id)
return m_monitorManager->projectMonitor();
}
void Core::seekMonitor(int id, int position)
{
if (!m_guiConstructed) {
return;
}
if (id == Kdenlive::ProjectMonitor) {
m_monitorManager->projectMonitor()->requestSeek(position);
} else {
m_monitorManager->clipMonitor()->requestSeek(position);
}
}
Bin *Core::bin()
{
return m_mainWindow->getBin();
......
......@@ -162,6 +162,8 @@ public:
void refreshProjectItem(const ObjectId &id);
/** @brief Returns a reference to a monitor (clip or project monitor) */
Monitor *getMonitor(int id);
/** @brief Seek a monitor to position */
void seekMonitor(int id, int position);
/** @brief Returns timeline's active track info (position and tag) */
QPair <int,QString> currentTrackInfo() const;
/** @brief This function must be called whenever the profile used changes */
......
......@@ -1858,7 +1858,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
pCore->projectItemModel()->requestAddBinClip(updatedId, currentProd, folderId, undo, redo, callBack);
}
}
pCore->getMonitor(Kdenlive::ProjectMonitor)->requestSeek(position + pasteDuration);
pCore->seekMonitor(Kdenlive::ProjectMonitor, position + pasteDuration);
}
if (!docId.isEmpty() && docId != pCore->currentDoc()->getDocumentProperty(QStringLiteral("documentid"))) {
......@@ -1887,7 +1887,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
pCore->projectItemModel()->requestAddFolder(folderId, i18n("Pasted clips"), rootId, undo, redo);
}
QDomNodeList binClips = copiedItems.documentElement().elementsByTagName(QStringLiteral("producer"));
pCore->getMonitor(Kdenlive::ProjectMonitor)->requestSeek(position + (pasteDuration * ratio));
pCore->seekMonitor(Kdenlive::ProjectMonitor, position + (pasteDuration * ratio));
for (int i = 0; i < binClips.count(); ++i) {
QDomElement currentProd = binClips.item(i).toElement();
if (ratio != 1.) {
......
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