summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 70f00c6..6559119 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -361,14 +361,17 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
QString cat = categories.first();
if ( !cat.isEmpty()) {
colorToSet = *(KOPrefs::instance()->categoryColor(cat) );
} else
setColor = false;
}
-
- int odue = mTodo->hasDueSubTodo( !isOpen());
+ bool openMode = !isOpen();
+ // maybe we are in flat-display-mode
+ if ( !firstChild() )
+ openMode = false;
+ int odue = mTodo->hasDueSubTodo( openMode );
if (odue == 2) {
colorToSet = KOPrefs::instance()->mTodoOverdueColor;
setColor = true;
} else if ( odue == 1 ) {
colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
setColor = true;