]> git.sesse.net Git - kdenlive/commitdiff
Fix DVD menus with more than 9 buttons:
authorTill Theato <root@ttill.de>
Thu, 23 Dec 2010 22:57:18 +0000 (22:57 +0000)
committerTill Theato <root@ttill.de>
Thu, 23 Dec 2010 22:57:18 +0000 (22:57 +0000)
http://kdenlive.org/mantis/view.php?id=1661

svn path=/trunk/kdenlive/; revision=5192

src/dvdwizard.cpp
src/dvdwizardchapters.cpp
src/dvdwizardmenu.cpp

index fe6833c6fe4146d8f63a2304433e2a7554971428..542e6b3576737117aff48c0777d0cd2703e66d2c 100644 (file)
@@ -456,7 +456,7 @@ void DvdWizard::generateDvd()
                 QDomText call;
                 if (i == voburls.count() - 1) call = dvddoc.createTextNode("{g1 = 0; call menu;}");
                 else {
-                    call = dvddoc.createTextNode("{if ( g1 eq 999 ) { call menu; } jump title " + QString::number(i + 2) + ";}");
+                    call = dvddoc.createTextNode("{if ( g1 eq 999 ) { call menu; } jump title " + QString::number(i + 2).rightJustified(2, '0') + ";}");
                 }
                 post.appendChild(call);
                 pgc2.appendChild(post);
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;
index 04c012233d925600c1dcfc1103437cbae520d010..2a204dc7459f192d186d57a8ebcf1a8b739017db 100644 (file)
@@ -277,14 +277,11 @@ void DvdWizardMenu::changeProfile(bool isPal)
     if (isPal == false) {
         m_width = 720;
         m_height = 480;
-        m_isPal = false;
-        updatePreview();
     } else {
         m_width = 720;
         m_height = 576;
-        m_isPal = true;
-        updatePreview();
     }
+    updatePreview();
 }
 
 void DvdWizardMenu::updatePreview()