]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
Fix several issues with transitions, including all problems reported in:
[kdenlive] / src / mainwindow.cpp
index c3e16caafe10956c01b90c3479c3b450fa62d585..de3c69f64bb5f3e561e3551429a116f89ac9d80b 100644 (file)
@@ -452,7 +452,7 @@ void MainWindow::configureNotifications() {
 }
 
 void MainWindow::slotFullScreen() {
-    //KToggleFullScreenAction::setFullScreen(this, actionCollection()->action("fullscreen")->isChecked());
+    KToggleFullScreenAction::setFullScreen(this, actionCollection()->action("fullscreen")->isChecked());
 }
 
 void MainWindow::slotAddEffect(QDomElement effect, GenTime pos, int track) {
@@ -1137,7 +1137,7 @@ void MainWindow::slotEditProjectSettings() {
         KdenliveSettings::setProject_fps(m_activeDocument->fps());
         setCaption(m_activeDocument->description(), m_activeDocument->isModified());
         m_monitorManager->resetProfiles(m_activeDocument->timecode());
-        if (m_renderWidget) m_renderWidget->setDocumentStandard(m_activeDocument->getDocumentStandard());
+        if (m_renderWidget) m_renderWidget->setProfile(m_activeDocument->mltProfile());
         m_timelineArea->setTabText(m_timelineArea->currentIndex(), m_activeDocument->description());
 
         // We need to desactivate & reactivate monitors to get a refresh
@@ -1151,7 +1151,7 @@ void MainWindow::slotRenderProject() {
         m_renderWidget = new RenderWidget(this);
         connect(m_renderWidget, SIGNAL(doRender(const QString&, const QString&, const QStringList &, const QStringList &, bool, bool, double, double)), this, SLOT(slotDoRender(const QString&, const QString&, const QStringList &, const QStringList &, bool, bool, double, double)));
         if (m_activeDocument) {
-            m_renderWidget->setDocumentStandard(m_activeDocument->getDocumentStandard());
+            m_renderWidget->setProfile(m_activeDocument->mltProfile());
             m_renderWidget->setGuides(m_activeDocument->guidesXml(), m_activeDocument->projectDuration());
         }
     }
@@ -1328,7 +1328,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //cha
 
     trackView->projectView()->setContextMenu(m_timelineContextMenu, m_timelineContextClipMenu, m_timelineContextTransitionMenu);
     m_activeTimeline = trackView;
-    if (m_renderWidget) m_renderWidget->setDocumentStandard(doc->getDocumentStandard());
+    if (m_renderWidget) m_renderWidget->setProfile(doc->mltProfile());
     doc->setRenderer(m_projectMonitor->render);
     m_commandStack->setActiveStack(doc->commandStack());
     KdenliveSettings::setProject_display_ratio(doc->dar());
@@ -1353,7 +1353,9 @@ void MainWindow::slotPreferences(int page, int option) {
     // cached, in which case you want to display the cached dialog
     // instead of creating another one
     if (KConfigDialog::showDialog("settings")) {
-        if (page != -1) static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"))->showPage(page, option);
+        KdenliveSettingsDialog* d = static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"));
+        if (page != -1) d->showPage(page, option);
+        d->checkProfile();
         return;
     }
 
@@ -1487,9 +1489,8 @@ void MainWindow::slotAddTransition(QAction *result) {
     QStringList info = result->data().toStringList();
     if (info.isEmpty()) return;
     QDomElement transition = transitions.getEffectByTag(info.at(1), info.at(2));
-    //QDomElement effect = transitions.getEffectByName(result->data().toString());
-    if (m_activeTimeline) {
-        m_activeTimeline->projectView()->slotAddTransitionToSelectedClips(transition);
+    if (m_activeTimeline && !transition.isNull()) {
+        m_activeTimeline->projectView()->slotAddTransitionToSelectedClips(transition.cloneNode().toElement());
     }
 }