Commit b2e7699a authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Update the commit button only if the corresponding wizard page is shown

If one presses Return while a recipient input widget has focus, then the
wizard switches to the next page and the SignEncryptWidget emits an
operationChanged signal which triggers an update of the commit button.
This update needs to be ignored, so that the label text that is
cleared in initializePage() of the second page is not set again.

GnuPG-bug-id: 5535
parent 4aacd973
...@@ -162,8 +162,6 @@ public: ...@@ -162,8 +162,6 @@ public:
vLay->addWidget(outputGrp); vLay->addWidget(outputGrp);
updateCommitButton(mWidget->currentOp());
setMinimumHeight(300); setMinimumHeight(300);
} }
...@@ -190,6 +188,7 @@ public: ...@@ -190,6 +188,7 @@ public:
void initializePage() override void initializePage() override
{ {
setCommitPage(true); setCommitPage(true);
updateCommitButton(mWidget->currentOp());
} }
void setArchiveForced(bool archive) void setArchiveForced(bool archive)
...@@ -346,6 +345,9 @@ public: ...@@ -346,6 +345,9 @@ public:
private Q_SLOTS: private Q_SLOTS:
void updateCommitButton(const QString &label) void updateCommitButton(const QString &label)
{ {
if (mParent->currentPage() != this) {
return;
}
auto btn = mParent->button(QWizard::CommitButton); auto btn = mParent->button(QWizard::CommitButton);
if (!label.isEmpty()) { if (!label.isEmpty()) {
mParent->setButtonText(QWizard::CommitButton, label); mParent->setButtonText(QWizard::CommitButton, label);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment