Dynamically determine database validity
* Check that the database composite key exists, has sub-keys associated with it, and the root group exists.
This commit is contained in:
@@ -1122,9 +1122,7 @@ QSharedPointer<Database> BrowserService::selectedDatabase()
|
||||
for (int i = 0;; ++i) {
|
||||
auto* dbWidget = m_dbTabWidget->databaseWidgetFromIndex(i);
|
||||
// Add only open databases
|
||||
if (dbWidget && dbWidget->database()->hasKey()
|
||||
&& (dbWidget->currentMode() == DatabaseWidget::Mode::ViewMode
|
||||
|| dbWidget->currentMode() == DatabaseWidget::Mode::EditMode)) {
|
||||
if (dbWidget && !dbWidget->isLocked()) {
|
||||
databaseWidgets.push_back(dbWidget);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user