author | umopapisdn <umopapisdn> | 2003-03-23 20:33:00 (UTC) |
---|---|---|
committer | umopapisdn <umopapisdn> | 2003-03-23 20:33:00 (UTC) |
commit | b5606a63c9f3524f9475b6ac79f0b6bcc7162fa6 (patch) (unidiff) | |
tree | d4c7bd2dbf63858d3ac70926514d91a4bd6d63e0 | |
parent | dfa17505b14011b50822d50c925cc6aa0299b1b4 (diff) | |
download | opie-b5606a63c9f3524f9475b6ac79f0b6bcc7162fa6.zip opie-b5606a63c9f3524f9475b6ac79f0b6bcc7162fa6.tar.gz opie-b5606a63c9f3524f9475b6ac79f0b6bcc7162fa6.tar.bz2 |
Bugfix: (bug #0000211) Events ending at mat the following day. Fix for dayview.
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index a6a1be3..42f026a 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp | |||
@@ -303,20 +303,22 @@ void DateBookDay::redraw() | |||
303 | 303 | ||
304 | void DateBookDay::getEvents() | 304 | void DateBookDay::getEvents() |
305 | { | 305 | { |
306 | widgetList.clear(); | 306 | widgetList.clear(); |
307 | 307 | ||
308 | QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, | 308 | QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate ); |
309 | currDate ); | 309 | QValueListIterator<EffectiveEvent> it; |
310 | QValueListIterator<EffectiveEvent> it; | 310 | for ( it = eventList.begin(); it != eventList.end(); ++it ) { |
311 | for ( it = eventList.begin(); it != eventList.end(); ++it ) { | 311 | EffectiveEvent ev=*it; |
312 | DateBookDayWidget* w = new DateBookDayWidget( *it, this ); | 312 | if(!(ev.end().hour()==ev.start().hour() && ev.end().minute()==ev.start().minute())) {// Skip effective events with no duration. (i.e ending at 00:00) |
313 | connect( w, SIGNAL( deleteMe( const Event & ) ), | 313 | DateBookDayWidget* w = new DateBookDayWidget( *it, this ); |
314 | this, SIGNAL( removeEvent( const Event & ) ) ); | 314 | connect( w, SIGNAL( deleteMe( const Event & ) ), |
315 | connect( w, SIGNAL( editMe( const Event & ) ), | 315 | this, SIGNAL( removeEvent( const Event & ) ) ); |
316 | this, SIGNAL( editEvent( const Event & ) ) ); | 316 | connect( w, SIGNAL( editMe( const Event & ) ), |
317 | connect( w, SIGNAL( beamMe( const Event & ) ), | 317 | this, SIGNAL( editEvent( const Event & ) ) ); |
318 | this, SIGNAL( beamEvent( const Event & ) ) ); | 318 | connect( w, SIGNAL( beamMe( const Event & ) ), |
319 | widgetList.append( w ); | 319 | this, SIGNAL( beamEvent( const Event & ) ) ); |
320 | widgetList.append( w ); | ||
321 | } | ||
320 | } | 322 | } |
321 | 323 | ||
322 | } | 324 | } |
@@ -360,7 +362,7 @@ void DateBookDay::relayoutPage( bool fromResize ) | |||
360 | setUpdatesEnabled( FALSE ); | 362 | setUpdatesEnabled( FALSE ); |
361 | if ( !fromResize ) | 363 | if ( !fromResize ) |
362 | getEvents(); // no need we already have them! | 364 | getEvents(); // no need we already have them! |
363 | 365 | ||
364 | widgetList.sort(); | 366 | widgetList.sort(); |
365 | //sorts the widgetList by the heights of the widget so that the tallest widgets are at the beginning | 367 | //sorts the widgetList by the heights of the widget so that the tallest widgets are at the beginning |
366 | //this is needed for the simple algo below to work correctly, otherwise some widgets would be drawn outside the view | 368 | //this is needed for the simple algo below to work correctly, otherwise some widgets would be drawn outside the view |