From: Jean-Baptiste Mardelle Date: Sun, 30 Dec 2012 21:47:33 +0000 (+0100) Subject: Fix script rendering dialog requesting existing file: http://kdenlive.org/mantis... X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=0a470cfe6d9058c7c3c043485bae8216c66fe9f5;p=kdenlive Fix script rendering dialog requesting existing file: http://kdenlive.org/mantis/view.php?id=2913 --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5e6d4ded..88d8fa7f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4088,9 +4088,15 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS if (scriptExport) { QString scriptsFolder = m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash) + "scripts/"; QString path = m_renderWidget->getFreeScriptName(m_activeDocument->url()); - KUrl finalPath = KUrlRequesterDialog::getUrl(path, m_renderWidget, i18n("Create Render Script")); - if (finalPath.isEmpty()) return; - scriptPath = finalPath.path(); + QPointer getUrl = new KUrlRequesterDialog(path, i18n("Create Render Script"), this); + getUrl->fileDialog()->setMode(KFile::File); + getUrl->fileDialog()->setOperationMode(KFileDialog::Saving); + if (getUrl->exec() == QDialog::Rejected) { + delete getUrl; + return; + } + scriptPath = getUrl->selectedUrl().path(); + delete getUrl; QFile f(scriptPath); if (f.exists()) { if (KMessageBox::warningYesNo(this, i18n("Script file already exists. Do you want to overwrite it?")) != KMessageBox::Yes)