This commit is contained in:
Dagen Brock 2017-02-04 22:20:35 -06:00
parent ecec861b1c
commit 0bc028c056

View File

@ -9,7 +9,7 @@
#include "qformlayout.h" #include "qformlayout.h"
#include "qdialogbuttonbox.h" #include "qdialogbuttonbox.h"
const QString MainWindow::programName = QString("buckshot"); 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"); const QString MainWindow::imageName = QString("saved");
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent) :
@ -405,6 +405,9 @@ void MainWindow::on_pushButton_saveImage_clicked()
// PROMPT FOR SAVE FILENAME AND COPY (HOPEFULLY) TO SAVE FILENAME // PROMPT FOR SAVE FILENAME AND COPY (HOPEFULLY) TO SAVE FILENAME
QString saveFile = QFileDialog::getSaveFileName(0, "Save file", QDir::currentPath(), filters, &defaultFilter); QString saveFile = QFileDialog::getSaveFileName(0, "Save file", QDir::currentPath(), filters, &defaultFilter);
if (QFile::exists(saveFile)) {
QFile::remove(saveFile);
}
QFile::copy(a2filename, saveFile); QFile::copy(a2filename, saveFile);
} }
@ -642,7 +645,7 @@ void MainWindow::on_pushButton_saveToProdos_clicked()
QString addfile_output = QString(addfile_process.readAllStandardOutput()); QString addfile_output = QString(addfile_process.readAllStandardOutput());
// IF FILE ALREADY EXISTS, ASK IF THEY WANT TO OVERWRITE // 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; QMessageBox::StandardButton reply;
reply = QMessageBox::question(this, "File exists in image", "File exists, Replace?", reply = QMessageBox::question(this, "File exists in image", "File exists, Replace?",
QMessageBox::Yes|QMessageBox::No); QMessageBox::Yes|QMessageBox::No);