Fix locking database when password generator is triggered from browser extension

This commit is contained in:
varjolintu 2023-09-03 07:51:06 +03:00
parent 1919c23c09
commit ab587b2228
No known key found for this signature in database
GPG Key ID: F6D95B66E258AD31

View File

@ -506,6 +506,8 @@ void BrowserService::showPasswordGenerator(const KeyPairMessage& keyPairMessage)
if (!m_passwordGenerator) {
m_passwordGenerator.reset(PasswordGeneratorWidget::popupGenerator(m_currentDatabaseWidget));
connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), m_passwordGenerator.data(), SIGNAL(closed()));
connect(m_passwordGenerator.data(), &PasswordGeneratorWidget::closed, m_passwordGenerator.data(), [=] {
if (!m_passwordGenerator->isPasswordGenerated()) {
auto errorMessage = browserMessageBuilder()->getErrorReply("generate-password",