Wait till pdfworker finishes before new search, cancel running

This commit is contained in:
2018-08-30 21:54:29 +02:00
parent 854f252dd9
commit 64b2eda9e5
5 changed files with 50 additions and 1 deletions

View File

@ -119,6 +119,9 @@ void MainWindow::makePdfPreview()
{
if(!pdfWorkerThread.isRunning())
pdfWorkerThread.start();
pdfWorker->cancelAndWait();
QCoreApplication::processEvents(); // Process not processed images
qDeleteAll(ui->scrollAreaWidgetContents->children());
ui->scrollAreaWidgetContents->setLayout(new QHBoxLayout());