]> git.sesse.net Git - kdenlive/commitdiff
Fix bugs when default profile does not match current/last profile.
authorDan Dennedy <dan@dennedy.org>
Wed, 2 Feb 2011 08:12:01 +0000 (08:12 +0000)
committerDan Dennedy <dan@dennedy.org>
Wed, 2 Feb 2011 08:12:01 +0000 (08:12 +0000)
It introduced various fps- and duration-related problems. Also, the
geometry widget would sometimes have the wrong size. This was
particularly obvious when starting a new session where the last session
does not match the default project profile.

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

src/kdenlivedoc.cpp
src/mainwindow.cpp

index d1a340b8095ba1ef64ba4f0c553be2d1249d32a9..1ce567cb1a1dcacc8d7e2e94bb3f2f21cfea463e 100644 (file)
@@ -726,7 +726,7 @@ bool KdenliveDoc::setProfilePath(QString path)
     if (path.isEmpty()) path = KdenliveSettings::default_profile();
     if (path.isEmpty()) path = "dv_pal";
     m_profile = ProfilesDialog::getVideoProfile(path);
-    bool current_fps = m_fps;
+    double current_fps = m_fps;
     if (m_profile.path.isEmpty()) {
         // Profile not found, use embedded profile
         QDomElement profileInfo = m_document.elementsByTagName("profileinfo").at(0).toElement();
index bbfaa6e37c3b3d3444770c012c6301b8d40273c8..66d52156223ca2f11b400d4336021ca566a8ac3b 100644 (file)
@@ -156,6 +156,7 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
     if (!KdenliveSettings::colortheme().isEmpty()) slotChangePalette(NULL, KdenliveSettings::colortheme());
     setFont(KGlobalSettings::toolBarFont());
     parseProfiles(MltPath);
+    KdenliveSettings::setCurrent_profile(KdenliveSettings::default_profile());
     m_commandStack = new QUndoGroup;
     setDockNestingEnabled(true);
     m_timelineArea = new KTabWidget(this);
@@ -373,7 +374,6 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
     setCentralWidget(m_timelineArea);
 
 
-    KdenliveSettings::setCurrent_profile(KdenliveSettings::default_profile());
     m_fileOpenRecent = KStandardAction::openRecent(this, SLOT(openFile(const KUrl &)), actionCollection());
     readOptions();
     m_fileRevert = KStandardAction::revert(this, SLOT(slotRevert()), actionCollection());