diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index f1d5f866c..3fe6d09a0 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -464,6 +464,7 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode) m_ui->actionDatabaseMerge->setEnabled(m_ui->tabWidget->currentIndex() != -1); m_searchWidgetAction->setEnabled(true); + break; } case DatabaseWidget::EditMode: diff --git a/src/gui/SearchWidget.cpp b/src/gui/SearchWidget.cpp index 7aa5f2901..ed3a50b2a 100644 --- a/src/gui/SearchWidget.cpp +++ b/src/gui/SearchWidget.cpp @@ -119,7 +119,8 @@ void SearchWidget::databaseChanged(DatabaseWidget* dbWidget) if (dbWidget != nullptr) { // Set current search text from this database m_ui->searchEdit->setText(dbWidget->getCurrentSearch()); - + // Keyboard focus on search widget at database unlocking + connect(dbWidget, SIGNAL(unlockedDatabase()), this, SLOT(searchFocus())); // Enforce search policy emit caseSensitiveChanged(m_actionCaseSensitive->isChecked()); emit limitGroupChanged(m_actionLimitGroup->isChecked());