]> git.sesse.net Git - kdenlive/blobdiff - src/dvdwizardvob.cpp
Fix monitor displaying corrupt image on startup: http://www.kdenlive.org/mantis/view...
[kdenlive] / src / dvdwizardvob.cpp
index cce398d5f92128256b1d1f30b46853668d93c4dd..06b9c6dc0cc688b4a81bf573f15be8f60c5187b9 100644 (file)
@@ -284,6 +284,7 @@ void DvdWizardVob::slotAddVobFile(KUrl url, const QString &chapters, bool checkF
        slotCheckVobList();
        slotCheckProfiles();
     }
+    emit prepareMonitor();
 }
 
 void DvdWizardVob::slotDeleteVobFile()
@@ -332,7 +333,12 @@ QStringList DvdWizardVob::durations() const
     QStringList result;
     QString path;
     int max = m_vobList->topLevelItemCount();
-    for (int i = 0; i < max; i++) {
+    int i = 0;
+    if (m_view.use_intro->isChecked()) {
+       // First movie is only for intro
+       i = 1;
+    }
+    for (; i < max; i++) {
         QTreeWidgetItem *item = m_vobList->topLevelItem(i);
         if (item) result.append(QString::number(item->data(1, Qt::UserRole).toInt()));
     }
@@ -344,7 +350,12 @@ QStringList DvdWizardVob::chapters() const
     QStringList result;
     QString path;
     int max = m_vobList->topLevelItemCount();
-    for (int i = 0; i < max; i++) {
+    int i = 0;
+    if (m_view.use_intro->isChecked()) {
+       // First movie is only for intro
+       i = 1;
+    }
+    for (; i < max; i++) {
         QTreeWidgetItem *item = m_vobList->topLevelItem(i);
         if (item) {
             result.append(item->data(1, Qt::UserRole + 1).toString());
@@ -356,7 +367,12 @@ QStringList DvdWizardVob::chapters() const
 void DvdWizardVob::updateChapters(QMap <QString, QString> chaptersdata)
 {
     int max = m_vobList->topLevelItemCount();
-    for (int i = 0; i < max; i++) {
+    int i = 0;
+    if (m_view.use_intro->isChecked()) {
+       // First movie is only for intro
+       i = 1;
+    }
+    for (; i < max; i++) {
         QTreeWidgetItem *item = m_vobList->topLevelItem(i);
         if (chaptersdata.contains(item->text(0))) item->setData(1, Qt::UserRole + 1, chaptersdata.value(item->text(0)));
     }