mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Select new entry after cloning
Also fixes re-selecting entries during a search refresh
This commit is contained in:
committed by
Jonathan White
parent
b4be71d967
commit
cc35bf2096
@@ -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