Don't enable the Attach Database button if there is no DB open

This commit is contained in:
mgrojo
2019-11-09 17:45:40 +01:00
parent d447c739c0
commit fa3a844454

View File

@@ -1283,12 +1283,11 @@ void MainWindow::exportTableToJson()
dialog.exec();
}
void MainWindow::dbState( bool dirty )
void MainWindow::dbState(bool dirty)
{
ui->fileSaveAction->setEnabled(dirty);
ui->fileRevertAction->setEnabled(dirty);
ui->fileAttachAction->setEnabled(!dirty);
//ui->actionEncryption->setEnabled(!dirty);
ui->fileAttachAction->setEnabled(db.isOpen() && !dirty);
}
void MainWindow::fileSave()