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

Fix display of timeline usage in clip monitor

parent d4575061
......@@ -96,11 +96,10 @@ ProjectClip::ProjectClip(const QString &id, const QIcon &thumb, const std::share
}
// Make sure we have a hash for this clip
hash();
m_boundaryTimer.setSingleShot(true);
m_boundaryTimer.setInterval(500);
if (m_hasLimitedDuration) {
connect(&m_boundaryTimer, &QTimer::timeout, this, &ProjectClip::refreshBounds);
m_boundaryTimer.setSingleShot(true);
m_boundaryTimer.setInterval(500);
}
connect(m_markerModel.get(), &MarkerListModel::modelChanged, this, [&]() {
setProducerProperty(QStringLiteral("kdenlive:markers"), m_markerModel->toJson());
......@@ -162,6 +161,8 @@ ProjectClip::ProjectClip(const QString &id, const QDomElement &description, cons
} else {
m_name = i18n("Untitled");
}
m_boundaryTimer.setSingleShot(true);
m_boundaryTimer.setInterval(500);
connect(m_markerModel.get(), &MarkerListModel::modelChanged, this, [&]() { setProducerProperty(QStringLiteral("kdenlive:markers"), m_markerModel->toJson()); });
}
......@@ -555,8 +556,6 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer)
emit refreshPropertiesPanel();
if (m_hasLimitedDuration) {
connect(&m_boundaryTimer, &QTimer::timeout, this, &ProjectClip::refreshBounds);
m_boundaryTimer.setSingleShot(true);
m_boundaryTimer.setInterval(500);
} else {
disconnect(&m_boundaryTimer, &QTimer::timeout, this, &ProjectClip::refreshBounds);
}
......
......@@ -440,7 +440,7 @@ QByteArray MonitorProxy::getUuid() const
void MonitorProxy::updateClipBounds(QVector <QPoint>bounds)
{
if (bounds == m_clipBounds) {
if (bounds.size() == m_boundsCount) {
// Enforce refresh, in/out points may have changed
m_boundsCount = 0;
emit clipBoundsChanged();
......
......@@ -248,9 +248,9 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
}
}
}
if (logUndo && !m_endlessResize) {
emit pCore->clipInstanceResized(m_binClipId);
}
}
if (logUndo && !m_endlessResize) {
emit pCore->clipInstanceResized(m_binClipId);
}
return true;
}
......@@ -296,9 +296,9 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
}
}
}
if (logUndo && !m_endlessResize) {
emit pCore->clipInstanceResized(m_binClipId);
}
}
if (logUndo && !m_endlessResize) {
emit pCore->clipInstanceResized(m_binClipId);
}
return true;
}
......
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