]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.cpp
Move undo commands to their own subdirectory
[kdenlive] / src / projectlist.cpp
index eb17ca2e4e7ddf726ba32d07e27b5acb67cef2f0..eef4da490b172a6017a3add22bd29c281ada6b58 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "projectlist.h"
 #include "projectitem.h"
-#include "addfoldercommand.h"
+#include "commands/addfoldercommand.h"
 #include "kdenlivesettings.h"
 #include "slideshowclip.h"
 #include "ui_colorclip_ui.h"
 #include "projectlistview.h"
 #include "timecodedisplay.h"
 #include "profilesdialog.h"
-#include "editclipcommand.h"
-#include "editclipcutcommand.h"
-#include "editfoldercommand.h"
-#include "addclipcutcommand.h"
+#include "commands/editclipcommand.h"
+#include "commands/editclipcutcommand.h"
+#include "commands/editfoldercommand.h"
+#include "commands/addclipcutcommand.h"
 
 #include "ui_templateclip_ui.h"
 
@@ -1129,7 +1129,7 @@ void ProjectList::slotGotProxy(const QString &proxyPath)
     QTreeWidgetItemIterator it(m_listView);
     ProjectItem *item;
 
-    while (*it) {
+    while (*it && !m_abortAllProxies) {
         if ((*it)->type() == PROJECTCLIPTYPE) {
             item = static_cast <ProjectItem *>(*it);
             if (item->referencedClip()->getProperty("proxy") == proxyPath)
@@ -1166,6 +1166,7 @@ void ProjectList::slotGotProxy(ProjectItem *item)
 
 void ProjectList::slotResetProjectList()
 {
+    m_listView->blockSignals(true);
     m_abortAllProxies = true;
     m_proxyThreads.waitForFinished();
     m_proxyThreads.clearFutures();
@@ -1175,6 +1176,7 @@ void ProjectList::slotResetProjectList()
     m_refreshed = false;
     m_allClipsProcessed = false;
     m_abortAllProxies = false;
+    m_listView->blockSignals(false);
 }
 
 void ProjectList::slotUpdateClip(const QString &id)
@@ -1267,7 +1269,7 @@ void ProjectList::updateAllClips(bool displayRatioChanged, bool fpsChanged)
             item = static_cast <ProjectItem *>(*it);
             clip = item->referencedClip();
             if (item->referencedClip()->getProducer() == NULL) {
-                if (clip->isPlaceHolder() == false) {
+                if (clip->isPlaceHolder() == false && !item->isProxyRunning()) {
                     QDomElement xml = clip->toXML();
                     if (fpsChanged) {
                         xml.removeAttribute("out");
@@ -1837,7 +1839,7 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce
             int max = m_doc->clipManager()->clipsCount();
             emit displayMessage(i18n("Loading clips"), (int)(100 *(max - queue) / max));
         }
-        if (m_allClipsProcessed) processNextThumbnail();
+        if (m_allClipsProcessed) emit processNextThumbnail();
     }
     if (replace && item) {
         toReload = clipId;
@@ -2396,8 +2398,8 @@ void ProjectList::slotGenerateProxy()
             // Proxy process crashed
             QFile::remove(info.dest);
             setProxyStatus(info.dest, PROXYCRASHED);
-        }   
-
+        }
+        return;
     }
     
     if (info.type == IMAGE) {
@@ -2478,7 +2480,7 @@ void ProjectList::slotGenerateProxy()
             m_abortProxy.removeAll(info.dest);
             m_processingProxy.removeAll(info.dest);
             QFile::remove(info.dest);
-            setProxyStatus(info.dest, NOPROXY);
+            if (!m_abortAllProxies) setProxyStatus(info.dest, NOPROXY);
             result = -2;
             
         }
@@ -2688,7 +2690,7 @@ void ProjectList::setProxyStatus(const QString proxyPath, PROXYSTATUS status, in
     if (proxyPath.isEmpty() || m_abortAllProxies) return;
     QTreeWidgetItemIterator it(m_listView);
     ProjectItem *item;
-    while (*it) {
+    while (*it && !m_abortAllProxies) {
         if ((*it)->type() == PROJECTCLIPTYPE) {
             item = static_cast <ProjectItem *>(*it);
             if (item->referencedClip()->getProperty("proxy") == proxyPath) {