[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise/kdepim/korganizer
From: Sergio Luis Martins <iamsergio () gmail ! com>
Date: 2010-10-18 12:14:33
Message-ID: 20101018121433.C0A40AC896 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1187136 by smartins:
Color the background with the "busy color" for multi-day events too.
kolab/issue4259
M +14 -4 koagendaview.cpp
--- branches/kdepim/enterprise/kdepim/korganizer/koagendaview.cpp #1187135:1187136
@@ -1048,7 +1048,7 @@
}
// The date for the event is not displayed, just ignore it
- if ( curCol >= int( mSelectedDates.count() ) ) {
+ if ( curCol >= static_cast<int>( mSelectedDates.count() ) ) {
return;
}
@@ -1363,16 +1363,26 @@
}
}
- const bool busyDay = KOEventView::makesWholeDayBusy( incidence );
+ const bool makesDayBusy = KOEventView::makesWholeDayBusy( incidence );
for ( t = dateTimeList.begin(); t != dateTimeList.end(); ++t ) {
- if ( busyDay ) {
+ if ( makesDayBusy ) {
Event::List &busyEvents = mBusyDays[(*t).date()];
busyEvents.append( event );
}
-
insertIncidence( incidence, (*t).date() );
}
+
+ // Can be multiday
+ if ( event && makesDayBusy && event->isMultiDay() ) {
+ const QDate lastVisibleDate = mSelectedDates.last();
+ for ( QDate date = event->dtStart().date();
+ date <= event->dtEnd().date() && date <= lastVisibleDate ;
+ date = date.addDays( 1 ) ) {
+ Event::List &busyEvents = mBusyDays[date];
+ busyEvents.append( event );
}
+ }
+}
void KOAgendaView::clearView()
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic