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

Don't depend on monitor in load task (better for tests)

parent 56b297a7
Pipeline #172246 passed with stage
in 6 minutes and 3 seconds
......@@ -1088,6 +1088,7 @@ Bin::Bin(std::shared_ptr<ProjectItemModel> model, QWidget *parent, bool isMainBi
, m_baseIconSize(160, 90)
, m_propertiesDock(nullptr)
, m_propertiesPanel(nullptr)
, m_monitor(nullptr)
, m_blankThumb()
, m_clipWidget()
, m_filterGroup(this)
......@@ -1969,6 +1970,7 @@ void Bin::setMonitor(Monitor *monitor)
m_monitor = monitor;
connect(m_monitor, &Monitor::addClipToProject, this, &Bin::slotAddClipToProject);
connect(m_monitor, &Monitor::refreshCurrentClip, this, &Bin::slotOpenCurrent);
connect(m_itemModel.get(), &ProjectItemModel::resetPlayOrLoopZone, m_monitor, &Monitor::resetPlayOrLoopZone, Qt::DirectConnection);
connect(this, &Bin::openClip, [&](std::shared_ptr<ProjectClip> clip, int in, int out) {
m_monitor->slotOpenClip(clip, in, out);
if (clip && clip->hasLimitedDuration()) {
......
......@@ -268,4 +268,5 @@ signals:
void effectDropped(const QStringList &, const QModelIndex &);
void addTag(const QString &, const QModelIndex &);
void addClipCut(const QString &, int, int);
void resetPlayOrLoopZone(const QString &id);
};
......@@ -324,7 +324,7 @@ void ClipLoadTask::run()
return;
}
m_running = true;
pCore->getMonitor(Kdenlive::ClipMonitor)->resetPlayOrLoopZone(QString::number(m_owner.second));
emit pCore->projectItemModel()->resetPlayOrLoopZone(QString::number(m_owner.second));
QString resource = Xml::getXmlProperty(m_xml, QStringLiteral("resource"));
qDebug()<<"============STARTING LOAD TASK FOR: "<<resource<<"\n\n:::::::::::::::::::";
int duration = 0;
......
......@@ -1790,7 +1790,6 @@ void Monitor::reloadActiveStream()
}
}
const QString Monitor::activeClipId()
{
if (m_controller) {
......
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