summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Unidiff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index bbc43e4..42a6f7c 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1152,25 +1152,24 @@ void KOAgendaView::fillAgenda()
1152 1152
1153 if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date 1153 if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date
1154 1154
1155 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1155 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
1156 // Already completed items can be displayed on their original due date 1156 // Already completed items can be displayed on their original due date
1157 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda 1157 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda
1158 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; 1158 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda;
1159 bool fillIn = false; 1159 bool fillIn = false;
1160 if ( todo->hasCompletedDate() && todo->completed().date() == currentDate ) 1160 if ( todo->hasCompletedDate() && todo->completed().date() == currentDate )
1161 fillIn = true; 1161 fillIn = true;
1162 if ( ! fillIn && !todo->hasCompletedDate() ) 1162 if ( ! fillIn && !todo->hasCompletedDate() )
1163 fillIn = ((todo->dtDue().date() == currentDate) && !overdue) || ((currentDate == today) && overdue); 1163 fillIn = ((todo->dtDue().date() == currentDate) && !overdue) || ((currentDate == today) && overdue);
1164 qDebug("refill todo ");
1165 if ( fillIn ) { 1164 if ( fillIn ) {
1166 if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue 1165 if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue
1167 if ( KOPrefs::instance()->mShowTodoInAgenda ) 1166 if ( KOPrefs::instance()->mShowTodoInAgenda )
1168 mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); 1167 mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol);
1169 } 1168 }
1170 else { 1169 else {
1171 QDateTime dt; 1170 QDateTime dt;
1172 if ( todo->hasCompletedDate() ) 1171 if ( todo->hasCompletedDate() )
1173 dt = todo->completed(); 1172 dt = todo->completed();
1174 else 1173 else
1175 dt = todo->dtDue();; 1174 dt = todo->dtDue();;
1176 1175
@@ -1499,25 +1498,25 @@ void KOAgendaView::scrollOneHourDown()
1499{ 1498{
1500 mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 ); 1499 mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 );
1501} 1500}
1502 1501
1503void KOAgendaView::setStartHour( int h ) 1502void KOAgendaView::setStartHour( int h )
1504{ 1503{
1505 mAgenda->setStartHour( h ); 1504 mAgenda->setStartHour( h );
1506 1505
1507} 1506}
1508 1507
1509void KOAgendaView::updateTodo( Todo * t, int ) 1508void KOAgendaView::updateTodo( Todo * t, int )
1510{ 1509{
1511 1510
1512 bool remove = false; 1511 bool remove = false;
1513 bool removeAD = false; 1512 bool removeAD = false;
1514 QDate da; 1513 QDate da;
1515 if ( t->hasCompletedDate() ) 1514 if ( t->hasCompletedDate() )
1516 da = t->completed().date(); 1515 da = t->completed().date();
1517 else 1516 else
1518 da = t->dtDue().date(); 1517 da = t->dtDue().date();
1519 if ( ! t->hasDueDate() && !t->hasCompletedDate() ) { 1518 if ( ! t->hasDueDate() && !t->hasCompletedDate() ) {
1520 remove = true; 1519 remove = true;
1521 removeAD = true; 1520 removeAD = true;
1522 } 1521 }
1523 else { 1522 else {