From 3a3ed56d627e7543a22ba77ca684c1914d722340 Mon Sep 17 00:00:00 2001 From: xboxones1 <91512529+xboxones1@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:59:53 +0000 Subject: [PATCH] Disable main window when saving --- src/gui/DatabaseWidget.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index cbe27ee4eb..5d6d1a8d40 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -2393,9 +2393,10 @@ bool DatabaseWidget::performSave(QString& errorMessage, const QString& fileName) QPointer focusWidget(qApp->focusWidget()); // Lock out interactions - m_entryView->setDisabled(true); - m_groupView->setDisabled(true); - m_tagView->setDisabled(true); + QWidget *mainWindow = this->window(); + if (mainWindow) { + mainWindow->setDisabled(true); + } QApplication::processEvents(); Database::SaveAction saveAction = Database::Atomic; @@ -2435,9 +2436,9 @@ bool DatabaseWidget::performSave(QString& errorMessage, const QString& fileName) } // Return control - m_entryView->setDisabled(false); - m_groupView->setDisabled(false); - m_tagView->setDisabled(false); + if (mainWindow) { + mainWindow->setDisabled(false); + } if (focusWidget && focusWidget->isVisible()) { focusWidget->setFocus();