author | zautrix <zautrix> | 2005-08-24 18:38:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-24 18:38:31 (UTC) |
commit | 2cde25d8061acd536bccd698722952ce8555f5db (patch) (side-by-side diff) | |
tree | 70f905e5de57b44c3503883b2f98925d9c92ef8b /korganizer/kodaymatrix.cpp | |
parent | 645ceb7a95dce4716eb87a1b9191d3f3c1657be3 (diff) | |
download | kdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.zip kdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.tar.gz kdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.tar.bz2 |
conflict res fix
-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 @@ -445,32 +445,35 @@ void KODayMatrix::updateViewTimed() Event *event; QDateTime dt; bool ok; bDays.fill( false); pDays.fill( false); hDays.fill( false); eDays.fill( false); mHolidays.clear(); QDate mStartDate = days[0]; QDate endDate = mStartDate.addDays( timeSpan ); for( event = events.first(); event; event = events.next() ) { // for event ushort recurType = event->doesRecur(); if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { continue; } + if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) { + continue; + } if ( event->doesRecur() ) { bool last; QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); QDateTime incidenceEnd; int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); bool invalid = false; while( true ) { if ( incidenceStart.isValid() ) { incidenceEnd = incidenceStart.addDays( eventlen ); int st = incidenceStart.date().daysTo( endDate ); if ( st >= 0 ) { // start before timeend int end = mStartDate.daysTo( incidenceEnd.date() ); if ( end >= 0 ) { // end after timestart --- got one! //normalize st = timeSpan - st; if ( st < 0 ) st = 0; @@ -671,32 +674,35 @@ void KODayMatrix::updateEvents() if ( !mCalendar ) return; for( int i = 0; i < NUMDAYS; i++ ) { // if events are set for the day then remember to draw it bold QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); int numEvents = eventlist.count(); Event *event; for( event = eventlist.first(); event != 0;event=eventlist.next()) { ushort recurType = event->doesRecur(); if ( ( recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur ) || ( recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur ) ) { numEvents--; } + if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) { + numEvents--; + } } if ( numEvents ) eDays.setBit(i); else eDays.clearBit(i); } } const QDate& KODayMatrix::getDate(int offset) { if (offset < 0 || offset > NUMDAYS-1) { qDebug("Wrong offset2 %d", offset); return days[0]; } return days[offset]; } |