slight conformity changes

This commit is contained in:
itsmattkc
2019-02-12 16:11:07 -08:00
parent c9cab263bb
commit 9fd320de45
+17 -10
View File
@@ -70,7 +70,9 @@ ProxyDialog::ProxyDialog(QWidget *parent, const QVector<Footage *> &footage) :
void ProxyDialog::accept() {
QVector<ProxyInfo> info_list;
bool yesForAll = false;
// set to TRUE if any existing proxies exist and the user chooses to overwrite all of them
bool overwrite_all_existing = false;
for (int i=0;i<selected_footage.size();i++) {
// loop through selected footage and send info to the proxy queue
@@ -99,25 +101,30 @@ void ProxyDialog::accept() {
}
// if the proposed proxy file already exists & user didn't select YesToAll box
if (QFileInfo::exists(info.path) && !yesForAll){
if (QFileInfo::exists(info.path) && !overwrite_all_existing){
int rtn = QMessageBox::warning( this,
tr("Proxy file exists"),
tr("The file \"%1\" already exists. Do you wish to replace it?").arg(info.path),
QMessageBox::YesToAll | QMessageBox::Yes | QMessageBox::No);
// return to dialog without closing or starting any proxy generation
switch (rtn){
case QMessageBox::Yes:
break;
case QMessageBox::YesToAll:
yesForAll = true;
break;
case QMessageBox::No:
return;
case QMessageBox::Yes:
// continue as normal, proxy generator will automatically overwrite this file
break;
case QMessageBox::YesToAll:
// continue as normal, also set variable so that above messagebox is not shown again
overwrite_all_existing = true;
break;
case QMessageBox::No:
// return to dialog without closing or starting any proxy generation
return;
}
}
// send to proxy generator thread
info_list.append(info);
}
// all proxy info checks out, queue it with the proxy generator
for (int i=0;i<info_list.size();i++) {
info_list.at(i).footage->proxy = true;