}
-void ClipItem::refreshClip(bool checkDuration)
+void ClipItem::refreshClip(bool checkDuration, bool forceResetThumbs)
{
if (checkDuration && (m_maxDuration != m_clip->maxDuration())) {
m_maxDuration = m_clip->maxDuration();
colour = colour.replace(0, 2, "#");
m_baseColor = QColor(colour.left(7));
update();
- } else resetThumbs(checkDuration);
+ } else resetThumbs(forceResetThumbs);
}
void ClipItem::slotFetchThumbs()
void resetThumbs(bool clearExistingThumbs);
/** @brief Updates clip properties from base clip.
- * @param checkDuration whether or not to check for a valid duration. */
- void refreshClip(bool checkDuration);
+ * @param checkDuration whether or not to check for a valid duration.
+ * @param resetThumbs whether or not to recreate the image thumbnails. */
+ void refreshClip(bool checkDuration, bool resetThumbs);
/** @brief Gets clip's marker times.
* @return A list of the times. */
if (reload && !m_document->renderer()->mltUpdateClip(info, clip->xml(), clip->baseClip()->producer(info.track))) {
emit displayMessage(i18n("Cannot update clip (time: %1, track: %2)", info.startPos.frames(m_document->fps()), info.track), ErrorMessage);
}
- clip->refreshClip(true);
+ clip->refreshClip(true, true);
}
}
}
item->slotSetEndThumb(pix);
}
}
- item->refreshClip(false);
+ item->refreshClip(false, false);
}
}
}
}
}
-void CustomTrackView::slotRefreshThumbs(const QString &id)
+void CustomTrackView::slotRefreshThumbs(const QString &id, bool resetThumbs)
{
QList<QGraphicsItem *> list = scene()->items();
ClipItem *clip = NULL;
if (list.at(i)->type() == AVWIDGET) {
clip = static_cast <ClipItem *>(list.at(i));
if (clip->clipProducer() == id) {
- clip->refreshClip(true);
+ clip->refreshClip(true, resetThumbs);
}
}
}
void slotGoToMarker(QAction *action);
void slotResetMenuPosition();
void slotDoResetMenuPosition();
- /** @brief Re-create the clip thumbnails. */
- void slotRefreshThumbs(const QString &id);
+ /** @brief Re-create the clip thumbnails.
+ * @param id The clip's Id string.
+ * @param resetThumbs Should we recreate the timeline thumbnails. */
+ void slotRefreshThumbs(const QString &id, bool resetThumbs);
signals:
void cursorMoved(int, int);
connect(m_projectMonitor->render, SIGNAL(removeInvalidClip(const QString &, bool)), m_projectList, SLOT(slotRemoveInvalidClip(const QString &, bool)));
- connect(m_clipMonitor, SIGNAL(refreshClipThumbnail(const QString &)), m_projectList, SLOT(slotRefreshClipThumbnail(const QString &)));
+ connect(m_clipMonitor, SIGNAL(refreshClipThumbnail(const QString &, bool)), m_projectList, SLOT(slotRefreshClipThumbnail(const QString &, bool)));
connect(m_clipMonitor, SIGNAL(adjustMonitorSize()), this, SLOT(slotAdjustClipMonitor()));
connect(m_projectMonitor, SIGNAL(adjustMonitorSize()), this, SLOT(slotAdjustProjectMonitor()));
}
//m_activeDocument->setRenderer(NULL);
disconnect(m_projectList, SIGNAL(clipSelected(DocClipBase *)), m_clipMonitor, SLOT(slotSetXml(DocClipBase *)));
- disconnect(m_projectList, SIGNAL(refreshClip(const QString &)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
+ disconnect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
m_clipMonitor->stop();
}
KdenliveSettings::setCurrent_profile(doc->profilePath());
m_transitionConfig->updateProjectFormat(doc->mltProfile(), doc->timecode(), doc->tracksList());
m_effectStack->updateProjectFormat(doc->mltProfile(), doc->timecode());
connect(m_projectList, SIGNAL(clipSelected(DocClipBase *, QPoint)), m_clipMonitor, SLOT(slotSetXml(DocClipBase *, QPoint)));
- connect(m_projectList, SIGNAL(refreshClip(const QString &)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
- connect(m_projectList, SIGNAL(refreshClip(const QString &)), trackView->projectView(), SLOT(slotRefreshThumbs(const QString &)));
+ connect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
+ connect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), trackView->projectView(), SLOT(slotRefreshThumbs(const QString &, bool)));
connect(m_projectList, SIGNAL(clipNeedsReload(const QString&, bool)), trackView->projectView(), SLOT(slotUpdateClip(const QString &, bool)));
connect(m_projectList, SIGNAL(projectModified()), doc, SLOT(setModified()));
properties.contains("force_aspect_den") ||
properties.contains("templatetext")) {
slotRefreshClipThumbnail(item);
- emit refreshClip(id);
- } else if (properties.contains("full_luma") || properties.contains("force_colorspace")) {
- emit refreshClip(id);
+ emit refreshClip(id, true);
+ } else if (properties.contains("full_luma") || properties.contains("force_colorspace") || properties.contains("loop")) {
+ emit refreshClip(id, false);
}
}
}
void clipNameChanged(const QString, const QString);
void clipNeedsReload(const QString&, bool);
/** @brief A property affecting display was changed, so we need to update monitors and thumbnails
- * @param id: The clip's id string */
- void refreshClip(const QString &id);
+ * @param id: The clip's id string
+ * @param resetThumbs Should we recreate the timeline thumbnails. */
+ void refreshClip(const QString &id, bool resetThumbs);
void updateRenderStatus();
void deleteProjectClips(QStringList ids, QMap <QString, QString> folderids);
void findInTimeline(const QString &clipId);
//kDebug() << " ------ ADDING TRANS PARAM: " << key << ": " << it.value();
}
// attach transition
+ m_isBlocked++;
+ mlt_service_lock(service.get_service());
mltPlantTransition(field, *transition, a_track, b_track);
// field->plant_transition(*transition, a_track, b_track);
+ mlt_service_unlock(service.get_service());
+ m_isBlocked--;
if (do_refresh) refresh();
return true;
}