]> git.sesse.net Git - kdenlive/blobdiff - src/clipmanager.cpp
Cleanup, fix mem leaks, fix unused clips not correctly updated on profile change
[kdenlive] / src / clipmanager.cpp
index 032a8524958ee280f8b6a0244f353fc5f9dc0e84..2437fdade9d3de9f298c32f16af7cc2983cb2685 100644 (file)
@@ -219,6 +219,13 @@ void ClipManager::updatePreviewSettings()
     }
 }
 
+void ClipManager::clearUnusedProducers()
+{
+    for (int i = 0; i < m_clipList.count(); i++) {
+        if (m_clipList.at(i)->numReferences() == 0) m_clipList.at(i)->deleteProducers();
+    }
+}
+
 void ClipManager::resetProducersList(QList <Mlt::Producer *> prods)
 {
     for (int i = 0; i < m_clipList.count(); i++) {
@@ -236,6 +243,7 @@ void ClipManager::resetProducersList(QList <Mlt::Producer *> prods)
             kDebug() << "// // // REPLACE CLIP: " << id;
         }
     }
+    emit checkAllClips();
 }
 
 void ClipManager::slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId)