summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 0f9a38f..d38cb00 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -117,13 +117,14 @@ void KOAgendaItem::initColor ()
117 mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; 117 mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ;
118 else 118 else
119 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; 119 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor;
120 } 120 }
121 else { 121 else {
122 QStringList categories = mIncidence->categories(); 122 QStringList categories = mIncidence->categories();
123 QString cat = categories.first(); 123 QString cat;
124 if(!categories.isEmpty()) cat = categories.first();
124 if (cat.isEmpty()) { 125 if (cat.isEmpty()) {
125 if ( (mIncidence->typeID() == todoID ) &&((static_cast<Todo*>(mIncidence))->isCompleted()) ) 126 if ( (mIncidence->typeID() == todoID ) &&((static_cast<Todo*>(mIncidence))->isCompleted()) )
126 mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; 127 mBackgroundColor =KOPrefs::instance()->mTodoDoneColor;
127 else 128 else
128 mBackgroundColor =KOPrefs::instance()->defaultColor( mIncidence->calID() ); 129 mBackgroundColor =KOPrefs::instance()->defaultColor( mIncidence->calID() );
129 } else { 130 } else {