From 8ca5dcad8722c1e1ff7622935466720cf3fcad61 Mon Sep 17 00:00:00 2001 From: Till Theato Date: Thu, 23 Dec 2010 22:57:18 +0000 Subject: [PATCH] Fix DVD menus with more than 9 buttons: http://kdenlive.org/mantis/view.php?id=1661 svn path=/trunk/kdenlive/; revision=5192 --- src/dvdwizard.cpp | 2 +- src/dvdwizardchapters.cpp | 5 +++-- src/dvdwizardmenu.cpp | 5 +---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/dvdwizard.cpp b/src/dvdwizard.cpp index fe6833c6..542e6b35 100644 --- a/src/dvdwizard.cpp +++ b/src/dvdwizard.cpp @@ -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); diff --git a/src/dvdwizardchapters.cpp b/src/dvdwizardchapters.cpp index 61055608..baf682b1 100644 --- a/src/dvdwizardchapters.cpp +++ b/src/dvdwizardchapters.cpp @@ -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; diff --git a/src/dvdwizardmenu.cpp b/src/dvdwizardmenu.cpp index 04c01223..2a204dc7 100644 --- a/src/dvdwizardmenu.cpp +++ b/src/dvdwizardmenu.cpp @@ -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() -- 2.39.2