mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-26 00:05:34 -04:00
Focus the search field instead of closing it when pressing the shortcut.
Closes #124
This commit is contained in:
parent
a6d44034a4
commit
2d8ba2b394
1 changed files with 10 additions and 2 deletions
|
@ -681,9 +681,17 @@ void DatabaseWidget::switchToImportKeepass1(const QString& fileName)
|
||||||
|
|
||||||
void DatabaseWidget::toggleSearch()
|
void DatabaseWidget::toggleSearch()
|
||||||
{
|
{
|
||||||
if (m_entryView->inEntryListMode()) {
|
if (isInSearchMode()) {
|
||||||
|
if (m_searchUi->searchEdit->hasFocus()) {
|
||||||
closeSearch();
|
closeSearch();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
m_searchUi->searchEdit->selectAll();
|
||||||
|
m_searchUi->searchEdit->setFocus();
|
||||||
|
// make sure the search action is checked again
|
||||||
|
emitCurrentModeChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
showSearch();
|
showSearch();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue