Disable main window when saving

This commit is contained in:
xboxones1 2024-12-17 15:59:53 +00:00
parent 6a1b5026f0
commit 3a3ed56d62

View File

@ -2393,9 +2393,10 @@ bool DatabaseWidget::performSave(QString& errorMessage, const QString& fileName)
QPointer<QWidget> 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();