From a087d11c37b3244d83aba787e54a5f399febdf9b Mon Sep 17 00:00:00 2001 From: Alberto Villa Date: Mon, 15 Jun 2009 23:05:17 +0000 Subject: [PATCH] block the user from inserting another chapter at 00:00:00:00 (thanks to Ben Klopfenstein) svn path=/trunk/kdenlive/; revision=3543 --- src/dvdwizardvob.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dvdwizardvob.cpp b/src/dvdwizardvob.cpp index 85741016..ad1035b1 100644 --- a/src/dvdwizardvob.cpp +++ b/src/dvdwizardvob.cpp @@ -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(); } -- 2.39.2