-rw-r--r-- | korganizer/kotodoview.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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) if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { QStringList categories = mActiveItem->todo()->categories (); + QString colcat = categories.first(); if (categories.find (mCategory[index]) != categories.end ()) categories.remove (mCategory[index]); @@ -967,4 +968,10 @@ void KOTodoView::changedCategories(int index) categories.insert (categories.end(), mCategory[index]); categories.sort (); + if ( !colcat.isEmpty() ) { + if ( categories.find ( colcat ) != categories.end () ) { + categories.remove( colcat ); + categories.prepend( colcat ); + } + } mActiveItem->todo()->setCategories (categories); mActiveItem->construct(); |