summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/categoryselectdialog.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 4d80726..974752c 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -59,13 +59,16 @@ CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
void CategorySelectDialog::editCategoriesDialog()
{
KPIM::CategoryEditDialog* ced = new KPIM::CategoryEditDialog(mPrefs,this );
ced->exec();
delete ced;
+ slotApply();
+ QStringList temp = mCategoryList;
setCategories();
+ setSelected( temp );
}
void CategorySelectDialog::setCategories()
{
mColorItem = 0;
mCategories->clear();
mCategoryList.clear();
@@ -189,27 +192,27 @@ void CategorySelectDialog::slotApply()
}
item = (QCheckListItem *)item->nextSibling();
}
categories.sort();
if ( ! colcat.isEmpty() )
categories.prepend( colcat );
- QString categoriesStr = categories.join(",");
+ // QString categoriesStr = categories.join(",");
mCategoryList = categories;
- emit categoriesSelected(categories);
- emit categoriesSelected(categoriesStr);
}
void CategorySelectDialog::accept()
{
slotOk();
}
void CategorySelectDialog::slotOk()
{
slotApply();
+ emit categoriesSelected(mCategoryList);
+ emit categoriesSelected(mCategoryList.join(","));
QDialog::accept();
}
void CategorySelectDialog::clear()
{
QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();