Wait till pdfworker finishes before new search, cancel running

Tá an tiomantas seo le fáil i:
2018-08-30 21:54:29 +02:00
tuismitheoir e8ef4be571
tiomantas 53cf73cc8d
D'athraigh 5 comhad le 52 breiseanna agus 2 scriosta

Féach ar an gComhad

@ -121,7 +121,10 @@ void MainWindow::makePdfPreview()
{
if(!pdfWorkerThread.isRunning())
pdfWorkerThread.start();
qDeleteAll(ui->scrollAreaWidgetContents->children());
pdfWorker->cancelAndWait();
QCoreApplication::processEvents(); //Process not processed images
qDeleteAll(ui->scrollAreaWidgetContents->children());
ui->scrollAreaWidgetContents->setLayout(new QHBoxLayout());
emit startPdfPreviewGeneration(this->pdfSearchResults, 0.75);