]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
Progress on stopmotion widget (make it possible to switch between HDMI and V4L)
[kdenlive] / src / mainwindow.cpp
index 6da2cacaffb174b85b3a4dc9ccdde1e8409f7977..25942b1961aa007798396e059e5607e7bcd4ac80 100644 (file)
@@ -1967,6 +1967,12 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale)
     if (!m_timelineArea->isEnabled()) return;
     m_fileRevert->setEnabled(true);
 
+    // Recreate stopmotion widget on document change
+    if (m_stopmotion) {
+       delete m_stopmotion;
+       m_stopmotion = NULL;
+    }
+
     KProgressDialog progressDialog(this, i18n("Loading project"), i18n("Loading project"));
     progressDialog.setAllowCancel(false);
     progressDialog.progressBar()->setMaximum(4);
@@ -2163,6 +2169,12 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
 {
     double dar = m_activeDocument->dar();
 
+    // Recreate the stopmotion widget if profile changes
+    if (m_stopmotion) {
+       delete m_stopmotion;
+       m_stopmotion = NULL;
+    }
+
     // Deselect current effect / transition
     m_effectStack->slotClipItemSelected(NULL, 0);
     m_transitionConfig->slotTransitionItemSelected(NULL, 0, QPoint(), false);