From 6e58f770567ab69ebee8cea23d370671c27e2969 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Mon, 20 Jun 2011 20:20:19 +0000 Subject: [PATCH] Fix massive project corruption when opening a document with frame rate different than default project's frame rate svn path=/trunk/kdenlive/; revision=5724 --- src/kdenlivedoc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kdenlivedoc.cpp b/src/kdenlivedoc.cpp index 229c4e02..eebaf6f7 100644 --- a/src/kdenlivedoc.cpp +++ b/src/kdenlivedoc.cpp @@ -152,6 +152,9 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup QDomElement mlt = m_document.firstChildElement("mlt"); QDomElement infoXml = mlt.firstChildElement("kdenlivedoc"); + // Set profile, fps, etc for the document + setProfilePath(infoXml.attribute("profile")); + // Check embedded effects QDomElement customeffects = infoXml.firstChildElement("customeffects"); if (!customeffects.isNull() && customeffects.hasChildNodes()) { @@ -257,7 +260,7 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup QDomNamedNodeMap props = docproperties.attributes(); for (int i = 0; i < props.count(); i++) m_documentProperties.insert(props.item(i).nodeName(), props.item(i).nodeValue()); - setProfilePath(infoXml.attribute("profile")); + if (validator.isModified()) setModified(true); kDebug() << "Reading file: " << url.path() << ", found clips: " << producers.count(); } -- 2.39.2