From 2e07edc33a51c488546fd7a005d2e0098a025a5f Mon Sep 17 00:00:00 2001
From: Laurent Montel
Date: Thu, 9 Apr 2009 09:01:57 +0000
Subject: [PATCH] Don't change state when we can't sign mail
svn path=/branches/kdepim/enterprise/kdepim/; revision=951416
---
kmcomposewin.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kmcomposewin.cpp b/kmcomposewin.cpp
index 93470f1c1..fac205622 100644
--- a/kmcomposewin.cpp
+++ b/kmcomposewin.cpp
@@ -3889,7 +3889,7 @@ void KMComposeWin::setEncryption( bool encrypt, bool setByUser )
"in the identity configuration.
"
""),
i18n("Undefined Encryption Key") );
- setModified(wasModified);
+ setModified( wasModified );
}
encrypt = false;
}
@@ -3925,6 +3925,7 @@ void KMComposeWin::slotSignToggled(bool on)
//-----------------------------------------------------------------------------
void KMComposeWin::setSigning( bool sign, bool setByUser )
{
+ bool wasModified = isModified();
if ( setByUser )
setModified( true );
if ( !mSignAction->isEnabled() )
@@ -3932,7 +3933,7 @@ void KMComposeWin::setSigning( bool sign, bool setByUser )
// check if the user defined a signing key for the current identity
if ( sign && !mLastIdentityHasSigningKey ) {
- if ( setByUser )
+ if ( setByUser ) {
KMessageBox::sorry( this,
i18n("In order to be able to sign "
"this message you first have to "
@@ -3942,6 +3943,8 @@ void KMComposeWin::setSigning( bool sign, bool setByUser )
"in the identity configuration.
"
""),
i18n("Undefined Signing Key") );
+ setModified( wasModified );
+ }
sign = false;
}