mirror of
https://github.com/digarok/buckshot.git
synced 2024-12-12 09:29:02 +00:00
fix for overwrite bug issue #4 https://github.com/digarok/buckshot/issues/4
This commit is contained in:
parent
ecec861b1c
commit
0bc028c056
@ -9,7 +9,7 @@
|
||||
#include "qformlayout.h"
|
||||
#include "qdialogbuttonbox.h"
|
||||
const QString MainWindow::programName = QString("buckshot");
|
||||
const QString MainWindow::version = QString("0.03");
|
||||
const QString MainWindow::version = QString("0.03h"); // hotfix
|
||||
const QString MainWindow::imageName = QString("saved");
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
@ -405,6 +405,9 @@ void MainWindow::on_pushButton_saveImage_clicked()
|
||||
|
||||
// PROMPT FOR SAVE FILENAME AND COPY (HOPEFULLY) TO SAVE FILENAME
|
||||
QString saveFile = QFileDialog::getSaveFileName(0, "Save file", QDir::currentPath(), filters, &defaultFilter);
|
||||
if (QFile::exists(saveFile)) {
|
||||
QFile::remove(saveFile);
|
||||
}
|
||||
QFile::copy(a2filename, saveFile);
|
||||
}
|
||||
|
||||
@ -642,7 +645,7 @@ void MainWindow::on_pushButton_saveToProdos_clicked()
|
||||
QString addfile_output = QString(addfile_process.readAllStandardOutput());
|
||||
|
||||
// IF FILE ALREADY EXISTS, ASK IF THEY WANT TO OVERWRITE
|
||||
if (addfile_output.contains("A file already exist with the same nam")) {
|
||||
if (addfile_output.contains("A file already exist with the same name")) {
|
||||
QMessageBox::StandardButton reply;
|
||||
reply = QMessageBox::question(this, "File exists in image", "File exists, Replace?",
|
||||
QMessageBox::Yes|QMessageBox::No);
|
||||
|
Loading…
Reference in New Issue
Block a user