diff --git a/src/editor/kmcomposerwin.cpp b/src/editor/kmcomposerwin.cpp index 80e912d87..61f423bdc 100644 --- a/src/editor/kmcomposerwin.cpp +++ b/src/editor/kmcomposerwin.cpp @@ -1801,6 +1801,7 @@ void KMComposerWin::setFcc(const QString &idString) if (col.isValid()) { mComposerBase->setFcc(col); mFccFolder->setCollection(col); + mIncorrectIdentityFolderWarning->clearFccInvalid(); } else { mIncorrectIdentityFolderWarning->fccIsInvalid(); qCWarning(KMAIL_LOG) << "setFcc: collection invalid " << idString; diff --git a/src/editor/warningwidgets/incorrectidentityfolderwarning.cpp b/src/editor/warningwidgets/incorrectidentityfolderwarning.cpp index 4377a68b1..2c8ec4ac0 100644 --- a/src/editor/warningwidgets/incorrectidentityfolderwarning.cpp +++ b/src/editor/warningwidgets/incorrectidentityfolderwarning.cpp @@ -58,6 +58,14 @@ void IncorrectIdentityFolderWarning::dictionaryInvalid() updateText(); } +void IncorrectIdentityFolderWarning::clearFccInvalid() +{ + if (mFccIsInvalid) { + mFccIsInvalid = false; + updateText(); + } +} + void IncorrectIdentityFolderWarning::addNewLine(QString &str) { if (!str.isEmpty()) { @@ -83,8 +91,13 @@ void IncorrectIdentityFolderWarning::updateText() addNewLine(text); text += i18n("Dictionary was not found. Please verify that you will use a correct dictionary."); } - setText(text); - animatedShow(); + if (text.isEmpty()) { + animatedHide(); + setText(QString()); + } else { + setText(text); + animatedShow(); + } } void IncorrectIdentityFolderWarning::slotHideAnnimationFinished() diff --git a/src/editor/warningwidgets/incorrectidentityfolderwarning.h b/src/editor/warningwidgets/incorrectidentityfolderwarning.h index afdffbc02..41f804e74 100644 --- a/src/editor/warningwidgets/incorrectidentityfolderwarning.h +++ b/src/editor/warningwidgets/incorrectidentityfolderwarning.h @@ -33,6 +33,7 @@ public: void fccIsInvalid(); void identityInvalid(); void dictionaryInvalid(); + void clearFccInvalid(); private: void addNewLine(QString &str);