m_baseTrackProducers.clear();
}
-void DocClipBase::deleteProducers()
+void DocClipBase::deleteProducers(bool clearThumbCreator)
{
kDebug() << "// CLIP KILL PRODS ct: " << m_baseTrackProducers.count();
- if (m_thumbProd) m_thumbProd->clearProducer();
+ if (clearThumbCreator && m_thumbProd) m_thumbProd->clearProducer();
/*kDebug()<<"// CLIP KILL PRODS ct: "<<m_baseTrackProducers.count();
int max = m_baseTrackProducers.count();
for (int i = 0; i < max; i++) {
void DocClipBase::setProducer(Mlt::Producer *producer, bool reset)
{
if (producer == NULL || m_placeHolder) return;
+ if (m_thumbProd && (reset || !m_thumbProd->hasProducer())) m_thumbProd->setProducer(producer);
if (reset) {
// Clear all previous producers
kDebug() << "/+++++++++++++++ DELETE ALL PRODS " << producer->get("id");
- deleteProducers();
+ deleteProducers(false);
}
QString id = producer->get("id");
if (id.contains('_')) {
}
//m_clipProducer = producer;
//m_clipProducer->set("transparency", m_properties.value("transparency").toInt());
- if (m_thumbProd && (reset || !m_thumbProd->hasProducer())) m_thumbProd->setProducer(producer);
}
Mlt::Producer *DocClipBase::audioProducer(int track)
void setProducerProperty(const char *name, const char *data);
void resetProducerProperty(const char *name);
void clearProducers();
- void deleteProducers();
+ void deleteProducers(bool clearThumbCreator = true);
/** Set default play zone for clip monitor */
void setZone(QPoint zone);
void KThumb::setProducer(Mlt::Producer *producer)
{
+ m_requestedThumbs.clear();
+ m_future.waitForFinished();
m_producer = producer;
// FIXME: the profile() call leaks an object, but trying to free
// it leads to a double-free in Profile::~Profile()
}
EditClipCommand *command = new EditClipCommand(m_projectList, clip->getId(), clip->properties(), newprops, true);
m_activeDocument->commandStack()->push(command);
- m_activeTimeline->projectView()->slotUpdateClip(clip->getId());
+ //m_activeTimeline->projectView()->slotUpdateClip(clip->getId());
m_activeDocument->setModified(true);
}
delete dia_ui;
// update clip in clip monitor
emit clipSelected(NULL);
emit clipSelected(item->referencedClip());
+ //TODO: Make sure the line below has no side effect
+ toReload = clipId;
}
/*else {
// Check if duration changed.
}*/
} else kDebug() << "//////// COULD NOT FIND CLIP TO UPDATE PRPS...";
int max = m_doc->clipManager()->clipsCount();
- emit displayMessage(i18n("Loading clips"), (int)(100 *(max - m_infoQueue.count()) / max));
- // small delay so that the app can display the progress info
if (item && m_infoQueue.isEmpty() && m_thumbnailQueue.isEmpty()) {
m_listView->setCurrentItem(item);
emit clipSelected(item->referencedClip());
- }
+ } else emit displayMessage(i18n("Loading clips"), (int)(100 *(max - m_infoQueue.count()) / max));
if (!toReload.isEmpty()) emit clipNeedsReload(toReload, true);
+ // small delay so that the app can display the progress info
QTimer::singleShot(30, this, SLOT(slotProcessNextClipInQueue()));
}