mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-12 01:29:38 -04:00
Close search before locking database and add additional check on current group.
Closes #309.
This commit is contained in:
parent
98d9dae087
commit
41a7c96968
1 changed files with 10 additions and 1 deletions
|
@ -889,8 +889,17 @@ void DatabaseWidget::clearLastGroup(Group* group)
|
||||||
void DatabaseWidget::lock()
|
void DatabaseWidget::lock()
|
||||||
{
|
{
|
||||||
Q_ASSERT(currentMode() != DatabaseWidget::LockedMode);
|
Q_ASSERT(currentMode() != DatabaseWidget::LockedMode);
|
||||||
|
if (isInSearchMode()) {
|
||||||
|
closeSearch();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_groupView->currentGroup()) {
|
||||||
m_groupBeforeLock = m_groupView->currentGroup()->uuid();
|
m_groupBeforeLock = m_groupView->currentGroup()->uuid();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_groupBeforeLock = m_db->rootGroup()->uuid();
|
||||||
|
}
|
||||||
|
|
||||||
clearAllWidgets();
|
clearAllWidgets();
|
||||||
m_unlockDatabaseWidget->load(m_filename);
|
m_unlockDatabaseWidget->load(m_filename);
|
||||||
setCurrentWidget(m_unlockDatabaseWidget);
|
setCurrentWidget(m_unlockDatabaseWidget);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue