Fixed file overwite from queued items

This commit is contained in:
Oleg Koncevoy
2019-03-21 19:32:31 +02:00
parent d059caa7de
commit d2e6a3a44a
5 changed files with 10 additions and 7 deletions

View File

@@ -1835,7 +1835,7 @@ BatchQueueEntry* EditorPanel::createBatchQueueEntry ()
isrc->getImageSource()->getFullSize (fullW, fullH, pparams.coarse.rotate == 90 || pparams.coarse.rotate == 270 ? TR_R90 : TR_NONE);
int prevh = BatchQueue::calcMaxThumbnailHeight();
int prevw = int ((size_t)fullW * (size_t)prevh / (size_t)fullH);
return new BatchQueueEntry (job, pparams, openThm->getFileName(), prevw, prevh, openThm);
return new BatchQueueEntry (job, pparams, openThm->getFileName(), prevw, prevh, openThm, options.overwriteOutputFile);
}
@@ -1928,6 +1928,7 @@ void EditorPanel::saveAsPressed ()
BatchQueueEntry* bqe = createBatchQueueEntry ();
bqe->outFileName = fnameOut;
bqe->saveFormat = saveAsDialog->getFormat ();
bqe->overwriteFile = !saveAsDialog->getAutoSuffix();
bqe->forceFormatOpts = saveAsDialog->getForceFormatOpts ();
parent->addBatchQueueJob (bqe, saveAsDialog->getToHeadOfQueue ());
fnameOK = true;