summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp1
-rw-r--r--korganizer/kotodoview.cpp7
2 files changed, 8 insertions, 0 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index f5eb52e..496f125 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -122,4 +122,5 @@ void KOEditorGeneral::editCategories()
122 connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); 122 connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &)));
123 //KOGlobals::fitDialogToScreen( csd ); 123 //KOGlobals::fitDialogToScreen( csd );
124 csd->setColorEnabled();
124 csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) ); 125 csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) );
125 csd->exec(); 126 csd->exec();
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 1a1bce5..3011458 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -962,4 +962,5 @@ void KOTodoView::changedCategories(int index)
962 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 962 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
963 QStringList categories = mActiveItem->todo()->categories (); 963 QStringList categories = mActiveItem->todo()->categories ();
964 QString colcat = categories.first();
964 if (categories.find (mCategory[index]) != categories.end ()) 965 if (categories.find (mCategory[index]) != categories.end ())
965 categories.remove (mCategory[index]); 966 categories.remove (mCategory[index]);
@@ -967,4 +968,10 @@ void KOTodoView::changedCategories(int index)
967 categories.insert (categories.end(), mCategory[index]); 968 categories.insert (categories.end(), mCategory[index]);
968 categories.sort (); 969 categories.sort ();
970 if ( !colcat.isEmpty() ) {
971 if ( categories.find ( colcat ) != categories.end () ) {
972 categories.remove( colcat );
973 categories.prepend( colcat );
974 }
975 }
969 mActiveItem->todo()->setCategories (categories); 976 mActiveItem->todo()->setCategories (categories);
970 mActiveItem->construct(); 977 mActiveItem->construct();