mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Return keyboard focus after saving database edits (#4287)
This commit is contained in:
parent
e9754efbbe
commit
3552ba2a30
@ -1646,6 +1646,8 @@ bool DatabaseWidget::save()
|
|||||||
m_blockAutoSave = true;
|
m_blockAutoSave = true;
|
||||||
++m_saveAttempts;
|
++m_saveAttempts;
|
||||||
|
|
||||||
|
auto focusWidget = qApp->focusWidget();
|
||||||
|
|
||||||
// TODO: Make this async
|
// TODO: Make this async
|
||||||
// Lock out interactions
|
// Lock out interactions
|
||||||
m_entryView->setDisabled(true);
|
m_entryView->setDisabled(true);
|
||||||
@ -1660,6 +1662,10 @@ bool DatabaseWidget::save()
|
|||||||
m_entryView->setDisabled(false);
|
m_entryView->setDisabled(false);
|
||||||
m_groupView->setDisabled(false);
|
m_groupView->setDisabled(false);
|
||||||
|
|
||||||
|
if (focusWidget) {
|
||||||
|
focusWidget->setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
if (ok) {
|
if (ok) {
|
||||||
m_saveAttempts = 0;
|
m_saveAttempts = 0;
|
||||||
m_blockAutoSave = false;
|
m_blockAutoSave = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user