mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-21 09:31:32 -08:00
Select new entry after cloning
Also fixes re-selecting entries during a search refresh
This commit is contained in:
1 parent
b4be71d967
commit
cc35bf2096
7 files changed
+59
-41
No files matched your search
@@ -447,6 +447,11 @@ void DatabaseWidget::cloneEntry()
|
||||
}
|
||||
|
||||
auto cloneDialog = new CloneDialog(this, m_db.data(), currentEntry);
|
||||
connect(cloneDialog, &CloneDialog::entryCloned, this, [this](auto entry) {
|
||||
refreshSearch();
|
||||
m_entryView->setCurrentEntry(entry);
|
||||
});
|
||||
|
||||
cloneDialog->show();
|
||||
}
|
||||
|
||||
@@ -1399,7 +1404,10 @@ void DatabaseWidget::performUnlockDatabase(const QString& password, const QStrin
|
||||
void DatabaseWidget::refreshSearch()
|
||||
{
|
||||
if (isSearchActive()) {
|
||||
auto selectedEntry = m_entryView->currentEntry();
|
||||
search(m_lastSearchText);
|
||||
// Re-select the previous entry if it is still in the search
|
||||
m_entryView->setCurrentEntry(selectedEntry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user