diff --git a/configuredialog.cpp b/configuredialog.cpp index 49dc5f3a0..15b282614 100644 --- a/configuredialog.cpp +++ b/configuredialog.cpp @@ -1976,12 +1976,31 @@ void AppearancePage::MessageTagTab::doLoadFromGlobalSettings() slotUpdateTagSettingWidgets( -1 ); //Needed since the previous function doesn't affect add button mTagAddButton->setEnabled( false ); + + // Save the original list + mOriginalMsgTagList.clear(); + foreach( const KMail::TagPtr &tag, mMsgTagList ) { + mOriginalMsgTagList.append( KMail::TagPtr( new KMail::Tag( *tag ) ) ); + } } void AppearancePage::MessageTagTab::save() { slotRecordTagSettings( mTagListBox->currentRow() ); + if ( mOriginalMsgTagList.count() == mMsgTagList.count() ) { + bool nothingChanged = true; + for ( int i=0; ipriority = mMsgTagList.indexOf( tag ); diff --git a/configuredialog_p.h b/configuredialog_p.h index 5f5eaaacc..f8b8a745b 100644 --- a/configuredialog_p.h +++ b/configuredialog_p.h @@ -484,6 +484,9 @@ private: // data // List of all Tags currently in the list QList mMsgTagList; + // So we can compare to mMsgTagList and see if the user changed tags + QList mOriginalMsgTagList; + /*Used to safely call slotRecordTagSettings when the selection in list box changes*/ int mPreviousTag;