From d6ce6b85d5588599a7904c8cc82ec47a00b42cfe Mon Sep 17 00:00:00 2001 From: Carlo Teubner <435950+c4rlo@users.noreply.github.com> Date: Wed, 16 Jan 2019 16:03:33 +0000 Subject: [PATCH] Edit entry widget: password generator: fix flicker (#2584) When using the password generator inside the Edit Entry screen and clicking the 'Accept' button, a new password would briefly be shown before the password generator was hidden (even though the original generated password would be applied to the entry). This issue was only visible when passwords were shown in plain text. Note that this is purely a cosmetic issue. --- src/gui/entry/EditEntryWidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp index 5da6e6605..66e69527b 100644 --- a/src/gui/entry/EditEntryWidget.cpp +++ b/src/gui/entry/EditEntryWidget.cpp @@ -994,7 +994,9 @@ bool EditEntryWidget::hasBeenModified() const void EditEntryWidget::togglePasswordGeneratorButton(bool checked) { - m_mainUi->passwordGenerator->regeneratePassword(); + if (checked) { + m_mainUi->passwordGenerator->regeneratePassword(); + } m_mainUi->passwordGenerator->setVisible(checked); }