X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdvdwizardchapters.cpp;h=807e1803fee4c3a567ba828f3e630d87b90e4f14;hb=9478c9540beca9bbfb31ba803bfd2eb332121860;hp=6105560832ba0ce92ed7ed857b71774e0301b91e;hpb=405ebfa31dec2209eca7031b7ee781f5ca7be10d;p=kdenlive diff --git a/src/dvdwizardchapters.cpp b/src/dvdwizardchapters.cpp index 61055608..807e1803 100644 --- a/src/dvdwizardchapters.cpp +++ b/src/dvdwizardchapters.cpp @@ -131,10 +131,10 @@ void DvdWizardChapters::slotRemoveChapter() void DvdWizardChapters::slotGoToChapter() { - m_monitor->setTimePos(m_tc.reformatSeparators(m_view.chapters_list->currentItem()->text() + ":00")); + if (m_view.chapters_list->currentItem()) m_monitor->setTimePos(m_tc.reformatSeparators(m_view.chapters_list->currentItem()->text() + ":00")); } -void DvdWizardChapters::setVobFiles(bool isPal, bool isWide, const QStringList movies, const QStringList durations, const QStringList chapters) +void DvdWizardChapters::setVobFiles(bool isPal, bool isWide, const QStringList &movies, const QStringList &durations, const QStringList &chapters) { m_isPal = isPal; QString profile; @@ -207,10 +207,11 @@ QStringList DvdWizardChapters::selectedTargets() const QStringList result; int max = m_view.vob_list->count(); for (int i = 0; i < max; i++) { - result.append("jump title " + QString::number(i + 1)); + // rightJustified: fill with 0s to make menus with more than 9 buttons work (now up to 99 buttons possible) + result.append("jump title " + QString::number(i + 1).rightJustified(2, '0')); QStringList chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList(); for (int j = 0; j < chapters.count(); j++) { - result.append("jump title " + QString::number(i + 1) + " chapter " + QString::number(j + 1)); + result.append("jump title " + QString::number(i + 1).rightJustified(2, '0') + " chapter " + QString::number(j + 1).rightJustified(2, '0')); } } return result;