Commit 33c812ac authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix render name incorrectly kept in some cases after save as.

Fixes #512
parent 4c1570cd
......@@ -2142,6 +2142,18 @@ void MainWindow::slotStopRenderProject()
}
}
void MainWindow::updateProjectPath(const QString &path)
{
if (m_renderWidget) {
m_renderWidget->resetRenderPath(path);
} else {
// Clear render name as project url changed
QMap<QString, QString> renderProps;
renderProps.insert(QStringLiteral("renderurl"), QString());
slotSetDocumentRenderProfile(renderProps);
}
}
void MainWindow::slotRenderProject()
{
KdenliveDoc *project = pCore->currentDoc();
......@@ -2152,7 +2164,6 @@ void MainWindow::slotRenderProject()
connect(m_renderWidget, &RenderWidget::selectedRenderProfile, this, &MainWindow::slotSetDocumentRenderProfile);
connect(m_renderWidget, &RenderWidget::abortProcess, this, &MainWindow::abortRenderJob);
connect(this, &MainWindow::updateRenderWidgetProfile, m_renderWidget, &RenderWidget::adjustViewToProfile);
connect(this, &MainWindow::updateProjectPath, m_renderWidget, &RenderWidget::resetRenderPath);
m_renderWidget->setGuides(project->getGuideModel());
m_renderWidget->updateDocumentPath();
m_renderWidget->setRenderProfile(project->getRenderProperties());
......
......@@ -320,6 +320,8 @@ public slots:
void slotAddSubtitle(const QString &text = QString());
/** @brief Ensure subtitle track is displayed */
void showSubtitleTrack();
/** @brief The path of the current document changed (save as), update render settings */
void updateProjectPath(const QString &path);
private slots:
/** @brief Shows the shortcut dialog. */
......@@ -566,7 +568,6 @@ signals:
/** @brief Enable or disable the undo stack. For example undo/redo should not be enabled when dragging a clip in timeline or we risk corruption. */
void enableUndo(bool enable);
bool focusTimeline(bool focus, bool highlight);
void updateProjectPath(const QString &path);
};
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment