]> git.sesse.net Git - kdenlive/commitdiff
The save file dialog should appear again if we don't want to overwrite the selected...
authorTill Theato <root@ttill.de>
Fri, 14 May 2010 10:35:54 +0000 (10:35 +0000)
committerTill Theato <root@ttill.de>
Fri, 14 May 2010 10:35:54 +0000 (10:35 +0000)
http://kdenlive.org/mantis/view.php?id=467

svn path=/trunk/kdenlive/; revision=4439

src/mainwindow.cpp
src/mainwindow.h

index 7c97a3daa59cd7e4e87713633b6941f421e41784..4bfe7c677b7b90a09d0f5e93504e707963ee04a0 100644 (file)
@@ -1598,7 +1598,9 @@ bool MainWindow::saveFileAs()
     QString outputFile = KFileDialog::getSaveFileName(KUrl(), mimetype);
     if (outputFile.isEmpty()) return false;
     if (QFile::exists(outputFile)) {
-        if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it?")) == KMessageBox::No) return false;
+        // Show the file dialog again if the user does not want to overwrite the file
+        if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it?")) == KMessageBox::No)
+            return saveFileAs();
     }
     return saveFileAs(outputFile);
 }
index e3ce183523c1e4e87f6b825ca03d32d5e125c04b..d4510b1bb9a163f70bac0e29b8750b290cded7fd 100644 (file)
@@ -234,8 +234,15 @@ private slots:
     void connectDocument(TrackView*, KdenliveDoc*);
     void openFile();
     void openLastFile();
+    /** @brief Checks whether a URL is available to save to.
+    * @return Whether the file was saved. */
     bool saveFile();
+    /** @brief Shows a save file dialog for saving the project.
+    * @return Whether the file was saved. */
     bool saveFileAs();
+    /** @brief Set properties to match outputFileName and save the document.
+    * @param outputFileName The URL to save to / The document's URL.
+    * @return Whether we had success. */
     bool saveFileAs(const QString &outputFileName);
     void slotPreferences(int page = -1, int option = -1);
     void updateConfiguration();