mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -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
@ -681,8 +681,16 @@ void DatabaseWidget::switchToImportKeepass1(const QString& fileName)
|
|||||||
|
|
||||||
void DatabaseWidget::toggleSearch()
|
void DatabaseWidget::toggleSearch()
|
||||||
{
|
{
|
||||||
if (m_entryView->inEntryListMode()) {
|
if (isInSearchMode()) {
|
||||||
closeSearch();
|
if (m_searchUi->searchEdit->hasFocus()) {
|
||||||
|
closeSearch();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_searchUi->searchEdit->selectAll();
|
||||||
|
m_searchUi->searchEdit->setFocus();
|
||||||
|
// make sure the search action is checked again
|
||||||
|
emitCurrentModeChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showSearch();
|
showSearch();
|
||||||
|
Loading…
Reference in New Issue
Block a user