bitsed / qosmic

A flam3 fractal image editor
GNU General Public License v3.0
64 stars 13 forks source link

'Save As...' has no overwrite prompt. #41

Closed PeterBBBBB closed 7 months ago

PeterBBBBB commented 4 years ago

Its too easy to accidentality overwrite a flam3 file with ‘Save As’ as there is no overwrite confirm prompt. Someone wanting to overwrite, would probably just use ‘Save’ anyway.

Can be fixed with a simple patch.

--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -600,6 +600,7 @@
    dialog.setAcceptMode(QFileDialog::AcceptSave);
    dialog.setDefaultSuffix("flam3");
    dialog.selectFile(curFile);
+   dialog.setOption(QFileDialog::DontConfirmOverwrite, false);
    if (dialog.exec())
    {
        QString fileName(dialog.selectedFiles().first());
PeterBBBBB commented 7 months ago

Fixed in commit c488d30 Thanks