Commit 901c3ecf authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix extract frame not remembering folder

parent 754b8eee
......@@ -971,9 +971,9 @@ void Monitor::slotExtractCurrentFrameToProject()
slotExtractCurrentFrame(QString(), true);
}
void Monitor::slotExtractCurrentFrame(QString path, bool addToProject)
void Monitor::slotExtractCurrentFrame(QString frameName, bool addToProject)
{
if (addToProject && QFileInfo(path).fileName().isEmpty()) {
if (addToProject && QFileInfo(frameName).fileName().isEmpty()) {
// convenience: when extracting an image to be added to the project,
// suggest a suitable image file name. In the project monitor, this
// suggestion bases on the project file name; in the clip monitor,
......@@ -989,7 +989,7 @@ void Monitor::slotExtractCurrentFrame(QString path, bool addToProject)
+ QStringLiteral("-f")
+ QString::number(render->seekFramePosition())
+ ".png";
path = QFileInfo(path, suggestedImageName).absoluteFilePath();
frameName = QFileInfo(frameName, suggestedImageName).fileName();
}
QString framesFolder = KRecentDirs::dir(":KdenliveFramesFolder");
......@@ -998,7 +998,7 @@ void Monitor::slotExtractCurrentFrame(QString path, bool addToProject)
fs->setMimeTypeFilters(QStringList() << QStringLiteral("image/png"));
fs->setAcceptMode(QFileDialog::AcceptSave);
fs->setDefaultSuffix(QStringLiteral("png"));
fs->selectFile(path);
fs->selectFile(frameName);
if (fs->exec()) {
if (!fs->selectedFiles().isEmpty()) {
QUrl savePath = fs->selectedUrls().first();
......
......@@ -241,7 +241,7 @@ private:
private slots:
void seekCursor(int pos);
void rendererStopped(int pos);
void slotExtractCurrentFrame(QString path = QString(), bool addToProject = false);
void slotExtractCurrentFrame(QString frameName = QString(), bool addToProject = false);
void slotExtractCurrentFrameToProject();
void slotSetThumbFrame();
void slotSaveZone();
......
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