-rw-r--r-- | korganizer/koagenda.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 63fdecd..9b817bc 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1416,6 +1416,7 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i | |||
1416 | int selDay; | 1416 | int selDay; |
1417 | if ( !backgroundOnly ) | 1417 | QDate curDate = QDate::currentDate(); |
1418 | if ( !backgroundOnly ) { | ||
1418 | for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) | 1419 | for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) |
1419 | { | 1420 | { |
1420 | if ( mSelectedDates[selDay] == QDateTime::currentDateTime ().date() && KOPrefs::instance()->mHighlightCurrentDay) { | 1421 | if ( mSelectedDates[selDay] == curDate && KOPrefs::instance()->mHighlightCurrentDay) { |
1421 | int x1 = cx; | 1422 | int x1 = cx; |
@@ -1447,2 +1448,3 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i | |||
1447 | } | 1448 | } |
1449 | } | ||
1448 | // Highlight working hours | 1450 | // Highlight working hours |
@@ -1475,3 +1477,3 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i | |||
1475 | if (xEnd > x2) xEnd = x2; | 1477 | if (xEnd > x2) xEnd = x2; |
1476 | if ( mSelectedDates[gxStart] == QDateTime::currentDateTime ().date()&& KOPrefs::instance()->mHighlightCurrentDay ) { | 1478 | if ( mSelectedDates[gxStart] == curDate && KOPrefs::instance()->mHighlightCurrentDay ) { |
1477 | if ( KOPrefs::instance()->mUseHighlightLightColor ) | 1479 | if ( KOPrefs::instance()->mUseHighlightLightColor ) |
@@ -1678,4 +1680,4 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) | |||
1678 | //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); | 1680 | //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); |
1679 | bool overdue = (!todo->isCompleted()) && (todo->dtDue() < QDate::currentDate())&& ( KOPrefs::instance()->mShowTodoInAgenda ); | 1681 | QDate currentDate = QDate::currentDate(); |
1680 | QDate currentDate; | 1682 | bool overdue = (!todo->isCompleted()) && (todo->dtDue() < currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); |
1681 | QDateTime dt; | 1683 | QDateTime dt; |
@@ -1686,3 +1688,2 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) | |||
1686 | if ( overdue ) { | 1688 | if ( overdue ) { |
1687 | currentDate = QDate::currentDate(); | ||
1688 | days += todo->dtDue().date().daysTo( currentDate ); | 1689 | days += todo->dtDue().date().daysTo( currentDate ); |