summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index e0a1a21..1864e22 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1151,3 +1151,3 @@ void KOAgendaView::fillAgenda()
- if ( ! todo->hasDueDate() ) continue; // todo shall not be displayed if it has no date
+ if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date
@@ -1158,5 +1158,5 @@ void KOAgendaView::fillAgenda()
- if ( ((todo->dtDue().date() == currentDate) && !overdue) ||
+ if ( ((todo->dtDue().date() == currentDate) && !overdue) || ( todo->hasCompletedDate() && todo->completed().date() == currentDate )||
((currentDate == today) && overdue) ) {
- if ( todo->doesFloat() || overdue ) { // Todo has no due-time set or is already overdue
+ if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue
if ( KOPrefs::instance()->mShowTodoInAgenda )
@@ -1165,4 +1165,10 @@ void KOAgendaView::fillAgenda()
else {
-
- int endY = mAgenda->timeToY(todo->dtDue().time()) - 1;
+ QDateTime dt;
+ if ( todo->hasCompletedDate() )
+ dt = todo->completed();
+ else
+ dt = todo->dtDue();;
+
+
+ int endY = mAgenda->timeToY(dt.time()) - 1;
int hi = (18/KOPrefs::instance()->mHourSize);