]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
Make it easier to save render scripts with custom names: http://www.kdenlive.org...
[kdenlive] / src / mainwindow.cpp
index 95b00560e59af1460bff02229bc44c301b66b738..5e6d4ded95af442802fab649748b4109771d7dd2 100644 (file)
@@ -4086,12 +4086,11 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
     QString scriptPath;
     QString playlistPath;
     if (scriptExport) {
-        bool ok;
         QString scriptsFolder = m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash) + "scripts/";
-        QString path = m_renderWidget->getFreeScriptName();
-        scriptPath = QInputDialog::getText(this, i18n("Create Render Script"), i18n("Script name (will be saved in: %1)", scriptsFolder), QLineEdit::Normal, KUrl(path).fileName(), &ok);
-        if (!ok || scriptPath.isEmpty()) return;
-        scriptPath.prepend(scriptsFolder);
+        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();
         QFile f(scriptPath);
         if (f.exists()) {
             if (KMessageBox::warningYesNo(this, i18n("Script file already exists. Do you want to overwrite it?")) != KMessageBox::Yes)