From 186ed086b522b58479dc432cc4ea141defcaefc6 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Mon, 3 Dec 2012 15:09:07 +0100 Subject: [PATCH] Fix bugs in loading of dvd project (background image/video widget & profile problems) --- src/dvdwizard.cpp | 2 +- src/dvdwizardmenu.cpp | 5 +++-- src/dvdwizardmenu.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dvdwizard.cpp b/src/dvdwizard.cpp index 741d5e6f..4fe1b296 100644 --- a/src/dvdwizard.cpp +++ b/src/dvdwizard.cpp @@ -985,5 +985,5 @@ void DvdWizard::slotLoad() QDomElement e = vobs.at(i).toElement(); m_pageVob->slotAddVobFile(KUrl(e.attribute("file")), e.attribute("chapters")); } - m_pageMenu->loadXml(dvdproject.firstChildElement("menu")); + m_pageMenu->loadXml(m_pageVob->dvdFormat(), dvdproject.firstChildElement("menu")); } diff --git a/src/dvdwizardmenu.cpp b/src/dvdwizardmenu.cpp index b922bf9c..bd0b9403 100644 --- a/src/dvdwizardmenu.cpp +++ b/src/dvdwizardmenu.cpp @@ -122,7 +122,7 @@ DvdWizardMenu::DvdWizardMenu(DVDFORMAT format, QWidget *parent) : connect(m_view.background_image, SIGNAL(textChanged(const QString &)), this, SLOT(buildImage())); connect(m_view.background_color, SIGNAL(changed(const QColor &)), this, SLOT(buildColor())); - connect(m_view.background_list, SIGNAL(activated(int)), this, SLOT(checkBackgroundType(int))); + connect(m_view.background_list, SIGNAL(currentIndexChanged(int)), this, SLOT(checkBackgroundType(int))); connect(m_view.target_list, SIGNAL(activated(int)), this, SLOT(setButtonTarget(int))); connect(m_view.back_to_menu, SIGNAL(toggled(bool)), this, SLOT(setBackToMenu(bool))); @@ -810,11 +810,12 @@ QDomElement DvdWizardMenu::toXml() const } -void DvdWizardMenu::loadXml(QDomElement xml) +void DvdWizardMenu::loadXml(DVDFORMAT format, QDomElement xml) { kDebug() << "// LOADING MENU"; if (xml.isNull()) return; kDebug() << "// LOADING MENU 1"; + changeProfile(format); m_view.create_menu->setChecked(xml.attribute("enabled").toInt()); if (xml.hasAttribute("background_color")) { m_view.background_list->setCurrentIndex(0); diff --git a/src/dvdwizardmenu.h b/src/dvdwizardmenu.h index 3854d8b9..5c5794f0 100644 --- a/src/dvdwizardmenu.h +++ b/src/dvdwizardmenu.h @@ -144,7 +144,7 @@ public: int menuMovieLength() const; void changeProfile(DVDFORMAT format); QDomElement toXml() const; - void loadXml(QDomElement xml); + void loadXml(DVDFORMAT format, QDomElement xml); void prepareUnderLines(); void resetUnderLines(); -- 2.39.2