]> git.sesse.net Git - kdenlive/commitdiff
block the user from inserting another chapter at 00:00:00:00 (thanks to Ben Klopfenstein)
authorAlberto Villa <avilla@FreeBSD.org>
Mon, 15 Jun 2009 23:05:17 +0000 (23:05 +0000)
committerAlberto Villa <avilla@FreeBSD.org>
Mon, 15 Jun 2009 23:05:17 +0000 (23:05 +0000)
svn path=/trunk/kdenlive/; revision=3543

src/dvdwizardvob.cpp

index 85741016950a57c42e1ef5f6e62d03e9a9a1b2ee..ad1035b18bde9120d123b8f9b5c77d01c49ba878 100644 (file)
@@ -133,9 +133,9 @@ void DvdWizardVob::slotAddVobFile(KUrl url, const QString &chapters)
     }
     delete producer;
 
-    if (chapters.isEmpty() == false) {
+    if (chapters.isEmpty() == false)
         item->setData(1, Qt::UserRole + 1, chapters);
-    else if (QFile::exists(url.path() + ".dvdchapter")) {
+    else if (QFile::exists(url.path() + ".dvdchapter")) {
         // insert chapters as children
         QFile file(url.path() + ".dvdchapter");
         if (file.open(QIODevice::ReadOnly)) {
@@ -149,7 +149,8 @@ void DvdWizardVob::slotAddVobFile(KUrl url, const QString &chapters)
             }
             item->setData(1, Qt::UserRole + 1, chaptersList.join(";"));
         }
-    }
+    } else // Explicitly add a chapter at 00:00:00:00
+        item->setData(1, Qt::UserRole + 1, "0");
 
     slotCheckVobList();
 }