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.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 76d5c4b..f53e5d5 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1159,9 +1159,37 @@ void KOAgendaView::fillAgenda()
// kdDebug() << " beginX: " << beginX << " endX: " << endX << endl;
if (event->doesFloat()) {
if (event->recurrence()->doesRecur()) {
- mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
+ if (event->isMultiDay() ) {
+ endX = endX - beginX;// endX is now number of days
+ if ( event->recursOn( currentDate ) ) {
+ endX += curCol;
+ beginX = curCol;
+ mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
+ } else {
+ //qDebug("days %d %s",endX , currentDate.toString().latin1());
+ QDate dateit = currentDate.addDays( -endX );
+ if ( event->recursOn( dateit ) ) {
+ //qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() );
+ if ( curCol-endX < 0 ) {
+ mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol);
+ }
+ }
+ }
+ } else {
+ mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
+ }
+#if 0
+ if (beginX <= 0 && curCol == 0) {
+ mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
+ } else if (beginX == curCol) {
+ mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
+ } else {
+ qDebug("skipped %d %d %d ",beginX , endX, curCol);
+ }
+#endif
+ //mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
} else {
if (beginX <= 0 && curCol == 0) {
mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
} else if (beginX == curCol) {