summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <jb@kdenlive.org>2017-06-16 05:31:27 (GMT)
committerJean-Baptiste Mardelle <jb@kdenlive.org>2017-06-16 05:31:27 (GMT)
commit72c75b7772d640608398fb8b657badf56f55b9e4 (patch)
tree1760d0faf0e9779eba18110c7539d868add966b5
parent8958d7df241c95677d33c327c4d3c5de54034fcc (diff)
Fix custom profile not found on creation
-rw-r--r--src/mainwindow.cpp16
-rw-r--r--src/mainwindow.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index ae72931..10b712a 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -64,6 +64,7 @@
#include "utils/thememanager.h"
#include "utils/progressbutton.h"
#include "effectslist/effectslistwidget.h"
+#include "profiles/profilerepository.hpp"
#include "utils/KoIconUtils.h"
#include "project/dialogs/temporarydata.h"
@@ -2010,7 +2011,7 @@ void MainWindow::connectDocument()
connect(m_effectStack->transitionConfig(), &TransitionSettings::seekTimeline, trackView->projectView(), &CustomTrackView::seekCursorPos);
connect(trackView->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(slotActivateMonitor()), Qt::DirectConnection);
- connect(project, &KdenliveDoc::updateFps, trackView, &Timeline::updateProfile, Qt::DirectConnection);
+ connect(project, &KdenliveDoc::updateFps, this, &MainWindow::slotUpdateProfile, Qt::DirectConnection);
connect(trackView, &Timeline::zoneMoved, this, &MainWindow::slotZoneMoved);
trackView->projectView()->setContextMenu(m_timelineContextMenu, m_timelineContextClipMenu, m_timelineContextTransitionMenu, m_clipTypeGroup, static_cast<QMenu *>(factory()->container(QStringLiteral("marker_menu"), this)));
if (m_renderWidget) {
@@ -4141,6 +4142,19 @@ void MainWindow::setTrimMode(const QString &mode)
}
}
+void MainWindow::slotUpdateProfile(bool updateFps)
+{
+ //reload the profile from disk
+ ProfileRepository::get()->refresh();
+
+ if (pCore->projectManager()->currentTimeline()) {
+ pCore->projectManager()->currentTimeline()->updateProfile(updateFps);
+ }
+ if (m_renderWidget) {
+ m_renderWidget->setProfile(pCore->projectManager()->current()->mltProfile().path);
+ }
+}
+
#ifdef DEBUG_MAINW
#undef DEBUG_MAINW
#endif
diff --git a/src/mainwindow.h b/src/mainwindow.h
index dcdd87f..d35fa0f 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -474,6 +474,8 @@ private slots:
void setTrimMode(const QString &mode);
/** @brief Set timeline toolbar icon size. */
void setTimelineToolbarIconSize(QAction *a);
+ /** @brief Make sure to reload profile if changed. */
+ void slotUpdateProfile(bool updateFps);
signals:
Q_SCRIPTABLE void abortRenderJob(const QString &url);