Merge branch 'yestoallProxyGen' of https://github.com/alcomposer/olive into alcomposer-yestoallProxyGen
This commit is contained in:
+17
-9
@@ -70,6 +70,7 @@ ProxyDialog::ProxyDialog(QWidget *parent, const QVector<Footage *> &footage) :
|
|||||||
|
|
||||||
void ProxyDialog::accept() {
|
void ProxyDialog::accept() {
|
||||||
QVector<ProxyInfo> info_list;
|
QVector<ProxyInfo> info_list;
|
||||||
|
bool yesForAll = false;
|
||||||
|
|
||||||
for (int i=0;i<selected_footage.size();i++) {
|
for (int i=0;i<selected_footage.size();i++) {
|
||||||
// loop through selected footage and send info to the proxy queue
|
// loop through selected footage and send info to the proxy queue
|
||||||
@@ -97,19 +98,26 @@ void ProxyDialog::accept() {
|
|||||||
info.path = QDir(custom_location).filePath(base_footage_fn);
|
info.path = QDir(custom_location).filePath(base_footage_fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the proposed proxy file already exists
|
// if the proposed proxy file already exists & user didn't select YesToAll box
|
||||||
if (QFileInfo::exists(info.path) && QMessageBox::warning(this,
|
if (QFileInfo::exists(info.path) && !yesForAll){
|
||||||
tr("Proxy file exists"),
|
int rtn = QMessageBox::warning( this,
|
||||||
tr("The file \"%1\" already exists. Do you wish to replace it?").arg(info.path),
|
tr("Proxy file exists"),
|
||||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
|
tr("The file \"%1\" already exists. Do you wish to replace it?").arg(info.path),
|
||||||
// return to dialog without closing or starting any proxy generation
|
QMessageBox::YesToAll | QMessageBox::Yes | QMessageBox::No);
|
||||||
return;
|
// 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// send to proxy generator thread
|
// send to proxy generator thread
|
||||||
info_list.append(info);
|
info_list.append(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
// all proxy info checks out, queue it with the proxy generator
|
// all proxy info checks out, queue it with the proxy generator
|
||||||
for (int i=0;i<info_list.size();i++) {
|
for (int i=0;i<info_list.size();i++) {
|
||||||
info_list.at(i).footage->proxy = true;
|
info_list.at(i).footage->proxy = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user