mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 00:09:53 -05:00
Close search before locking database and add additional check on current group.
Closes #309.
This commit is contained in:
parent
98d9dae087
commit
41a7c96968
@ -889,8 +889,17 @@ void DatabaseWidget::clearLastGroup(Group* group)
|
||||
void DatabaseWidget::lock()
|
||||
{
|
||||
Q_ASSERT(currentMode() != DatabaseWidget::LockedMode);
|
||||
if (isInSearchMode()) {
|
||||
closeSearch();
|
||||
}
|
||||
|
||||
if (m_groupView->currentGroup()) {
|
||||
m_groupBeforeLock = m_groupView->currentGroup()->uuid();
|
||||
}
|
||||
else {
|
||||
m_groupBeforeLock = m_db->rootGroup()->uuid();
|
||||
}
|
||||
|
||||
clearAllWidgets();
|
||||
m_unlockDatabaseWidget->load(m_filename);
|
||||
setCurrentWidget(m_unlockDatabaseWidget);
|
||||
|
Loading…
Reference in New Issue
Block a user