mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-03 11:41:03 -05:00
Merge pull request #887 from Noettore/hotfix/847-search_focus_at_startup
Solve issue #847: Keyboard autofocus on search field at startup
This commit is contained in:
commit
e72c56520e
@ -464,6 +464,7 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
|||||||
m_ui->actionDatabaseMerge->setEnabled(m_ui->tabWidget->currentIndex() != -1);
|
m_ui->actionDatabaseMerge->setEnabled(m_ui->tabWidget->currentIndex() != -1);
|
||||||
|
|
||||||
m_searchWidgetAction->setEnabled(true);
|
m_searchWidgetAction->setEnabled(true);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DatabaseWidget::EditMode:
|
case DatabaseWidget::EditMode:
|
||||||
|
@ -119,7 +119,8 @@ void SearchWidget::databaseChanged(DatabaseWidget* dbWidget)
|
|||||||
if (dbWidget != nullptr) {
|
if (dbWidget != nullptr) {
|
||||||
// Set current search text from this database
|
// Set current search text from this database
|
||||||
m_ui->searchEdit->setText(dbWidget->getCurrentSearch());
|
m_ui->searchEdit->setText(dbWidget->getCurrentSearch());
|
||||||
|
// Keyboard focus on search widget at database unlocking
|
||||||
|
connect(dbWidget, SIGNAL(unlockedDatabase()), this, SLOT(searchFocus()));
|
||||||
// Enforce search policy
|
// Enforce search policy
|
||||||
emit caseSensitiveChanged(m_actionCaseSensitive->isChecked());
|
emit caseSensitiveChanged(m_actionCaseSensitive->isChecked());
|
||||||
emit limitGroupChanged(m_actionLimitGroup->isChecked());
|
emit limitGroupChanged(m_actionLimitGroup->isChecked());
|
||||||
|
Loading…
Reference in New Issue
Block a user