Unverified Commit ff3c40d5 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Do not always enable action after error

This keeps the action buttons in the Notepad widget
in a proper state even when an error occured. Previously
this would enable the button even if the recipients
were invalid.
parent 1db344e1
Pipeline #169643 passed with stage
in 1 minute and 54 seconds
......@@ -273,7 +273,6 @@ public:
void cryptDone(const std::shared_ptr<const Kleo::Crypto::Task::Result> &result)
{
updateCommitButton();
mDecryptBtn->setEnabled(true);
mProgressBar->setVisible(false);
mProgressLabel->setVisible(false);
......@@ -311,6 +310,7 @@ 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) {
......@@ -346,8 +346,7 @@ public:
KMessageBox::error(q,
e.message(),
i18nc("@title", "Error in crypto action"));
mCryptBtn->setEnabled(true);
mDecryptBtn->setEnabled(true);
updateCommitButton();
mProgressBar->setVisible(false);
mProgressLabel->setVisible(false);
return;
......
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