From d8205a0da4f2d839477568f61080d0c1fcf2ebaa Mon Sep 17 00:00:00 2001 From: Albert S Date: Tue, 23 Aug 2022 17:37:01 +0200 Subject: [PATCH] gui: Disable search box as long as previews are being generated Otherwise "spamming" queries can cause high load and many outstanding may arrive only to be discarded anyway for not being part of the recent query. --- gui/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index f23828f..0aed105 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -215,6 +215,7 @@ void MainWindow::connectSignals() this->ui->previewProcessBar->setValue(this->ui->previewProcessBar->maximum()); this->ui->spinPreviewPage->setEnabled(true); this->ui->comboPreviewFiles->setEnabled(true); + ui->txtSearch->setEnabled(true); }); connect(&ipcPreviewClient, &IPCPreviewClient::error, this, [this](QString msg) @@ -955,6 +956,7 @@ void MainWindow::makePreviews(int page) ++this->currentPreviewGeneration; this->ui->spinPreviewPage->setEnabled(false); this->ui->comboPreviewFiles->setEnabled(false); + this->ui->txtSearch->setEnabled(false); emit startIpcPreviews(renderConfig, targets); }