]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
Fix profile change on first clip load: http://kdenlive.org/mantis/view.php?id=2925
[kdenlive] / src / mainwindow.cpp
index cdda0689f22fc6fa96506570061da7020a39a48e..3b64937db270269e57ded7e3d67bf92c0c22619c 100644 (file)
@@ -646,6 +646,17 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
             KdenliveSettings::setV4l_extension(data.section(';', 1, 1));
         }
     }
+    if (KdenliveSettings::grab_parameters().isEmpty() || KdenliveSettings::grab_extension().isEmpty()) {
+        KConfigGroup group(&conf, "screengrab");
+        QMap< QString, QString > values = group.entryMap();
+        QMapIterator<QString, QString> i(values);
+        if (i.hasNext()) {
+            i.next();
+            QString data = i.value();
+            KdenliveSettings::setGrab_parameters(data.section(';', 0, 0));
+            KdenliveSettings::setGrab_extension(data.section(';', 1, 1));
+        }
+    }
     if (KdenliveSettings::decklink_parameters().isEmpty() || KdenliveSettings::decklink_extension().isEmpty()) {
         KConfigGroup group(&conf, "decklink");
         QMap< QString, QString > values = group.entryMap();
@@ -2414,7 +2425,6 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
     KdenliveSettings::setCurrent_profile(profile);
     KdenliveSettings::setProject_fps(m_activeDocument->fps());
     setCaption(m_activeDocument->description(), m_activeDocument->isModified());
-
     m_activeDocument->clipManager()->clearUnusedProducers();
     m_monitorManager->resetProfiles(m_activeDocument->timecode());
     m_transitionConfig->updateProjectFormat(m_activeDocument->mltProfile(), m_activeDocument->timecode(), m_activeDocument->tracksList());
@@ -2429,6 +2439,7 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
     m_commandStack->activeStack()->clear();
     //Update the mouse position display so it will display in DF/NDF format by default based on the project setting.
     slotUpdateMousePosition(0);
+    m_projectList->slotReloadClip();
     // We need to desactivate & reactivate monitors to get a refresh
     //m_monitorManager->switchMonitors();
 }