Unverified Commit 135bd0a6 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Reenable decrypt button in padwidget after error

Noticed when testing that after entering the wrong
password the decrypt button stayed disabled in the
pad widget.
parent f1db18ee
......@@ -303,6 +303,8 @@ public:
config.writeEntry("wasCMS", proto == GpgME::CMS);
}
mDecryptBtn->setEnabled(true);
if (result->errorCode()) {
if (!result->errorString().isEmpty()) {
KMessageBox::error(q,
......@@ -314,7 +316,6 @@ public:
mEdit->setPlainText(QString::fromUtf8(mOutputData));
mOutputData.clear();
mRevertBtn->setVisible(true);
mDecryptBtn->setEnabled(true);
const auto decryptVerifyResult = dynamic_cast<const Kleo::Crypto::DecryptVerifyResult*>(result.get());
if (decryptVerifyResult) {
......
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