From ab587b2228c04fadd91138c13dac5b87f7774678 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Sun, 3 Sep 2023 07:51:06 +0300 Subject: [PATCH] Fix locking database when password generator is triggered from browser extension --- src/browser/BrowserService.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/browser/BrowserService.cpp b/src/browser/BrowserService.cpp index b412409a59..140482e9f0 100644 --- a/src/browser/BrowserService.cpp +++ b/src/browser/BrowserService.cpp @@ -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",