summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 131a345..a01323a 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1174,6 +1174,7 @@ void KOAgendaView::fillAgenda()
1174 1174
1175 DateList::ConstIterator dit; 1175 DateList::ConstIterator dit;
1176 int curCol = 0; 1176 int curCol = 0;
1177 int maxCol = mSelectedDates.count()-1;
1177 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { 1178 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
1178 QDate currentDate = *dit; 1179 QDate currentDate = *dit;
1179 // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() 1180 // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString()
@@ -1186,6 +1187,7 @@ void KOAgendaView::fillAgenda()
1186 mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; 1187 mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1;
1187 1188
1188 unsigned int numEvent; 1189 unsigned int numEvent;
1190 //qDebug("+++++NUMEVENT %d", dayEvents.count());
1189 for(numEvent=0;numEvent<dayEvents.count();++numEvent) { 1191 for(numEvent=0;numEvent<dayEvents.count();++numEvent) {
1190 Event *event = dayEvents.at(numEvent); 1192 Event *event = dayEvents.at(numEvent);
1191 if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) 1193 if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") )
@@ -1207,7 +1209,19 @@ void KOAgendaView::fillAgenda()
1207 beginX = curCol; 1209 beginX = curCol;
1208 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); 1210 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1209 } else { 1211 } else {
1210 //qDebug("days %d %s",endX , currentDate.toString().latin1()); 1212 //qDebug("days endX %d curCol %d max Col %d %s",endX ,curCol, maxCol, currentDate.toString().latin1());
1213 if ( curCol == maxCol && maxCol+1 < endX ) {
1214 int i;
1215 for ( i = 1; i< endX; ++i ) {
1216 if ( event->recursOn( currentDate.addDays( -i ) ) )
1217 break;
1218 }
1219 if ( i > maxCol ) {
1220 mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol);
1221 //qDebug("BINGO ");
1222 }
1223
1224 } else {
1211 QDate dateit = currentDate.addDays( -endX ); 1225 QDate dateit = currentDate.addDays( -endX );
1212 if ( event->recursOn( dateit ) ) { 1226 if ( event->recursOn( dateit ) ) {
1213 //qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() ); 1227 //qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() );
@@ -1216,6 +1230,7 @@ void KOAgendaView::fillAgenda()
1216 } 1230 }
1217 } 1231 }
1218 } 1232 }
1233 }
1219 } else { 1234 } else {
1220 mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); 1235 mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
1221 } 1236 }