]> git.sesse.net Git - kdenlive/commitdiff
Fix guides & groups not correctly restored when opening a file:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 18 Jun 2009 12:42:03 +0000 (12:42 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 18 Jun 2009 12:42:03 +0000 (12:42 +0000)
http://kdenlive.org/mantis/view.php?id=929

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

src/kdenlivedoc.cpp
src/trackview.cpp

index 9f357fe157bc81f33e7d2e7382a6cb684b54b08b..34286682f9a0f86207658464ec8a8c411bd0ee47 100644 (file)
@@ -191,7 +191,6 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
                                 infoXml.removeChild(markers);
                             }
                             setProfilePath(profileName);
-                            mlt.removeChild(infoXml);
                             kDebug() << "Reading file: " << url.path() << ", found clips: " << producers.count();
                         }
                     }
index fc2115263366389a5c7e55ea347dd786220068bd..1316483d26c4585a016438f6485b82399d1c38dc 100644 (file)
@@ -343,9 +343,14 @@ void TrackView::parseDocument(QDomDocument doc)
     // Rebuild groups
     QDomNodeList groups = doc.elementsByTagName("group");
     m_trackview->loadGroups(groups);
-
     m_trackview->setDuration(duration);
     kDebug() << "///////////  TOTAL PROJECT DURATION: " << duration;
+    
+    // Remove Kdenlive extra info from xml doc before sending it to MLT
+    QDomElement mlt = doc.firstChildElement("mlt");
+    QDomElement infoXml = mlt.firstChildElement("kdenlivedoc");
+    mlt.removeChild(infoXml);
+    
     slotRebuildTrackHeaders();
     if (!m_documentErrors.isNull()) KMessageBox::sorry(this, m_documentErrors);
     //m_trackview->setCursorPos(cursorPos);