]> git.sesse.net Git - kdenlive/blobdiff - src/dvdwizardchapters.cpp
Fix DVD menus with more than 9 buttons:
[kdenlive] / src / dvdwizardchapters.cpp
index 6105560832ba0ce92ed7ed857b71774e0301b91e..baf682b1faba5059021b217673d52473c513f4c3 100644 (file)
@@ -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;