X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fdvdwizardvob.cpp;h=06b9c6dc0cc688b4a81bf573f15be8f60c5187b9;hb=3b8469402b87f4af7176e470536364f25af63618;hp=655d086ed511506e12a328ac6c271901bdac8df8;hpb=b94d740d404a3528c7d93a5ea2c734d9a092d78a;p=kdenlive diff --git a/src/dvdwizardvob.cpp b/src/dvdwizardvob.cpp index 655d086e..06b9c6dc 100644 --- a/src/dvdwizardvob.cpp +++ b/src/dvdwizardvob.cpp @@ -333,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())); } @@ -345,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()); @@ -357,7 +367,12 @@ QStringList DvdWizardVob::chapters() const void DvdWizardVob::updateChapters(QMap 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))); }