]> git.sesse.net Git - kdenlive/commitdiff
Fix recursive search
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 30 May 2009 17:51:09 +0000 (17:51 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 30 May 2009 17:51:09 +0000 (17:51 +0000)
svn path=/trunk/kdenlive/; revision=3462

src/documentchecker.cpp

index 7abadea0f4da9888a6b2372489eb64c984435038..c41d274ab8f3ca4015ef9d4b5989ed696373353f 100644 (file)
@@ -105,12 +105,14 @@ void DocumentChecker::slotSearchClips()
     int ix = 0;
     m_view.recursiveSearch->setEnabled(false);
     QTreeWidgetItem *child = m_view.treeWidget->topLevelItem(ix);
-    while (child && child->data(0, statusRole).toInt() == CLIPMISSING) {
-        QString clipPath = searchFileRecursively(QDir(newpath), child->data(0, sizeRole).toString(), child->data(0, hashRole).toString());
-        if (!clipPath.isEmpty()) {
-            child->setText(1, clipPath);
-            child->setIcon(0, KIcon("dialog-ok"));
-            child->setData(0, statusRole, CLIPOK);
+    while (child) {
+        if (child->data(0, statusRole).toInt() == CLIPMISSING) {
+            QString clipPath = searchFileRecursively(QDir(newpath), child->data(0, sizeRole).toString(), child->data(0, hashRole).toString());
+            if (!clipPath.isEmpty()) {
+                child->setText(1, clipPath);
+                child->setIcon(0, KIcon("dialog-ok"));
+                child->setData(0, statusRole, CLIPOK);
+            }
         }
         ix++;
         child = m_view.treeWidget->topLevelItem(ix);