diff options
Diffstat (limited to 'korganizer/kocorehelper.cpp')
-rw-r--r-- | korganizer/kocorehelper.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/kocorehelper.cpp b/korganizer/kocorehelper.cpp index 374c7107b..5538d9c33 100644 --- a/korganizer/kocorehelper.cpp +++ b/korganizer/kocorehelper.cpp @@ -26,13 +26,17 @@ #include "koglobals.h" -TQColor KOCoreHelper::categoryColor( const TQStringList &categories ) +TQColor KOCoreHelper::categoryColor( const TQStringList &categories ) { + if ( categories.isEmpty() ) { + return KOPrefs::instance()->unsetCategoryColor(); + } + // FIXME: Correctly treat events with multiple categories TQString cat = categories.first(); TQColor bgColor; if (cat.isEmpty()) - bgColor = defaultEventColor(); + bgColor = KOPrefs::instance()->unsetCategoryColor(); else bgColor = *( KOPrefs::instance()->categoryColor( cat ) ); return bgColor; |