-rw-r--r-- | kaddressbook/filter.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp index b0d04ca..39d2ae4 100644 --- a/kaddressbook/filter.cpp +++ b/kaddressbook/filter.cpp @@ -182,13 +182,14 @@ Filter::List Filter::restore( KConfig *config, QString baseGroup ) - QStringList cats = KABPrefs::instance()->mCustomCategories; - for ( QStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) { - Filter filter; - filter.mName = *it; - filter.mEnabled = true; - filter.mCategoryList = *it; - filter.mMatchRule = Matching; - filter.mInternal = true; - list.append( filter ); + if ( list.isEmpty()) { + QStringList cats = KABPrefs::instance()->mCustomCategories; + for ( QStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) { + Filter filter; + filter.mName = *it; + filter.mEnabled = true; + filter.mCategoryList = *it; + filter.mMatchRule = Matching; + filter.mInternal = true; + list.append( filter ); + } } - return list; |