summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
Unidiff
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 9fe1be4..abb29f7 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -345,5 +345,5 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
345 345
346 if ( mSelected ) { 346 if ( mSelected ) {
347 pa.begin( paintPixSel() ); 347 pa.begin( this );
348 } else { 348 } else {
349 if ( mAllDay ) 349 if ( mAllDay )
@@ -358,5 +358,8 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
358 yy = y(); 358 yy = y();
359 else 359 else
360 yy = mCellYTop * ( height() / cellHeight() ); 360 yy = mCellYTop * ( height() / cellHeight() );
361 if ( mSelected ) {
362 pa.translate( -x, -yy );
363 }
361 xPaintCoord= x; 364 xPaintCoord= x;
362 yPaintCoord = yy; 365 yPaintCoord = yy;
@@ -471,5 +474,4 @@ void KOAgendaItem::resizePixmap( int w , int h )
471{ 474{
472 paintPix()->resize( w, h ); 475 paintPix()->resize( w, h );
473 paintPixSel()->resize( w, h );
474 476
475} 477}
@@ -494,14 +496,5 @@ QPixmap * KOAgendaItem::paintPixAllday()
494 return mPaintPixA ; 496 return mPaintPixA ;
495} 497}
496QPixmap * KOAgendaItem::paintPixSel() 498
497{
498 static QPixmap* mPaintPixSel = 0;
499 if ( ! mPaintPixSel ) {
500 int w = QApplication::desktop()->width();
501 int h = QApplication::desktop()->height();
502 mPaintPixSel = new QPixmap(w,h);
503 }
504 return mPaintPixSel ;
505}
506void KOAgendaItem::paintEvent ( QPaintEvent *e ) 499void KOAgendaItem::paintEvent ( QPaintEvent *e )
507{ 500{
@@ -528,4 +521,6 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
528 //qDebug("calling paintMe "); 521 //qDebug("calling paintMe ");
529 globalFlagBlockAgendaItemUpdate = 1; 522 globalFlagBlockAgendaItemUpdate = 1;
523 if ( mSelected )
524 return;
530 } 525 }
531 int rx, ry, rw, rh; 526 int rx, ry, rw, rh;
@@ -538,5 +533,6 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
538 QPixmap* paintFrom ; 533 QPixmap* paintFrom ;
539 if ( mSelected ) { 534 if ( mSelected ) {
540 paintFrom = paintPixSel(); 535 paintMe( mSelected );
536 return;
541 } else { 537 } else {
542 if ( mAllDay ) 538 if ( mAllDay )