-rw-r--r-- | korganizer/kodaymatrix.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 057df0d..7076e05 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -449,24 +449,27 @@ void KODayMatrix::updateViewTimed() | |||
449 | pDays.fill( false); | 449 | pDays.fill( false); |
450 | hDays.fill( false); | 450 | hDays.fill( false); |
451 | eDays.fill( false); | 451 | eDays.fill( false); |
452 | mHolidays.clear(); | 452 | mHolidays.clear(); |
453 | QDate mStartDate = days[0]; | 453 | QDate mStartDate = days[0]; |
454 | QDate endDate = mStartDate.addDays( timeSpan ); | 454 | QDate endDate = mStartDate.addDays( timeSpan ); |
455 | for( event = events.first(); event; event = events.next() ) { // for event | 455 | for( event = events.first(); event; event = events.next() ) { // for event |
456 | ushort recurType = event->doesRecur(); | 456 | ushort recurType = event->doesRecur(); |
457 | if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || | 457 | if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || |
458 | (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { | 458 | (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { |
459 | continue; | 459 | continue; |
460 | } | 460 | } |
461 | if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) { | ||
462 | continue; | ||
463 | } | ||
461 | if ( event->doesRecur() ) { | 464 | if ( event->doesRecur() ) { |
462 | bool last; | 465 | bool last; |
463 | QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); | 466 | QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); |
464 | QDateTime incidenceEnd; | 467 | QDateTime incidenceEnd; |
465 | int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); | 468 | int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); |
466 | bool invalid = false; | 469 | bool invalid = false; |
467 | while( true ) { | 470 | while( true ) { |
468 | if ( incidenceStart.isValid() ) { | 471 | if ( incidenceStart.isValid() ) { |
469 | incidenceEnd = incidenceStart.addDays( eventlen ); | 472 | incidenceEnd = incidenceStart.addDays( eventlen ); |
470 | int st = incidenceStart.date().daysTo( endDate ); | 473 | int st = incidenceStart.date().daysTo( endDate ); |
471 | if ( st >= 0 ) { // start before timeend | 474 | if ( st >= 0 ) { // start before timeend |
472 | int end = mStartDate.daysTo( incidenceEnd.date() ); | 475 | int end = mStartDate.daysTo( incidenceEnd.date() ); |
@@ -675,24 +678,27 @@ void KODayMatrix::updateEvents() | |||
675 | QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); | 678 | QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); |
676 | int numEvents = eventlist.count(); | 679 | int numEvents = eventlist.count(); |
677 | Event *event; | 680 | Event *event; |
678 | for( event = eventlist.first(); event != 0;event=eventlist.next()) { | 681 | for( event = eventlist.first(); event != 0;event=eventlist.next()) { |
679 | ushort recurType = event->doesRecur(); | 682 | ushort recurType = event->doesRecur(); |
680 | 683 | ||
681 | if ( ( recurType == Recurrence::rDaily && | 684 | if ( ( recurType == Recurrence::rDaily && |
682 | !KOPrefs::instance()->mDailyRecur ) || | 685 | !KOPrefs::instance()->mDailyRecur ) || |
683 | ( recurType == Recurrence::rWeekly && | 686 | ( recurType == Recurrence::rWeekly && |
684 | !KOPrefs::instance()->mWeeklyRecur ) ) { | 687 | !KOPrefs::instance()->mWeeklyRecur ) ) { |
685 | numEvents--; | 688 | numEvents--; |
686 | } | 689 | } |
690 | if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) { | ||
691 | numEvents--; | ||
692 | } | ||
687 | } | 693 | } |
688 | if ( numEvents ) | 694 | if ( numEvents ) |
689 | eDays.setBit(i); | 695 | eDays.setBit(i); |
690 | else | 696 | else |
691 | eDays.clearBit(i); | 697 | eDays.clearBit(i); |
692 | } | 698 | } |
693 | } | 699 | } |
694 | 700 | ||
695 | const QDate& KODayMatrix::getDate(int offset) | 701 | const QDate& KODayMatrix::getDate(int offset) |
696 | { | 702 | { |
697 | if (offset < 0 || offset > NUMDAYS-1) { | 703 | if (offset < 0 || offset > NUMDAYS-1) { |
698 | qDebug("Wrong offset2 %d", offset); | 704 | qDebug("Wrong offset2 %d", offset); |