mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-23 08:20:45 -05:00
Make Ctrl+F not toggle the search mode but always enable it.
Switching back from other applications, the previous behavior of Ctrl+F would often bother you in that it would dismiss the search widget if it was already enabled when you meant by the key you wanted to perform a search. Making Ctrl+F always set you in search mode should save user from having to care about the mode which is persistent across application switching and database locking.
This commit is contained in:
parent
57107ea560
commit
b1c3814972
5 changed files with 56 additions and 16 deletions
|
|
@ -702,6 +702,22 @@ void DatabaseWidget::switchToImportKeepass1(const QString& fileName)
|
|||
setCurrentWidget(m_keepass1OpenWidget);
|
||||
}
|
||||
|
||||
void DatabaseWidget::openSearch()
|
||||
{
|
||||
if (isInSearchMode()) {
|
||||
m_searchUi->searchEdit->selectAll();
|
||||
|
||||
if (!m_searchUi->searchEdit->hasFocus()) {
|
||||
m_searchUi->searchEdit->setFocus();
|
||||
// make sure the search action is checked again
|
||||
emitCurrentModeChanged();
|
||||
}
|
||||
}
|
||||
else {
|
||||
showSearch();
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseWidget::toggleSearch()
|
||||
{
|
||||
if (isInSearchMode()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue