mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 00:39: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()
|
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();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_groupBeforeLock = m_db->rootGroup()->uuid();
|
||||||
|
}
|
||||||
|
|
||||||
m_groupBeforeLock = m_groupView->currentGroup()->uuid();
|
|
||||||
clearAllWidgets();
|
clearAllWidgets();
|
||||||
m_unlockDatabaseWidget->load(m_filename);
|
m_unlockDatabaseWidget->load(m_filename);
|
||||||
setCurrentWidget(m_unlockDatabaseWidget);
|
setCurrentWidget(m_unlockDatabaseWidget);
|
||||||
|
Loading…
Reference in New Issue
Block a user