-rw-r--r-- | korganizer/koagendaitem.cpp | 24 | ||||
-rw-r--r-- | korganizer/koagendaitem.h | 1 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 2 |
3 files changed, 11 insertions, 16 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 9fe1be4..abb29f7 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -346,3 +346,3 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) | |||
346 | if ( mSelected ) { | 346 | if ( mSelected ) { |
347 | pa.begin( paintPixSel() ); | 347 | pa.begin( this ); |
348 | } else { | 348 | } else { |
@@ -359,3 +359,6 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) | |||
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; |
@@ -472,3 +475,2 @@ void KOAgendaItem::resizePixmap( int w , int h ) | |||
472 | paintPix()->resize( w, h ); | 475 | paintPix()->resize( w, h ); |
473 | paintPixSel()->resize( w, h ); | ||
474 | 476 | ||
@@ -495,12 +497,3 @@ QPixmap * KOAgendaItem::paintPixAllday() | |||
495 | } | 497 | } |
496 | QPixmap * 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 | } | ||
506 | void KOAgendaItem::paintEvent ( QPaintEvent *e ) | 499 | void KOAgendaItem::paintEvent ( QPaintEvent *e ) |
@@ -529,2 +522,4 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) | |||
529 | globalFlagBlockAgendaItemUpdate = 1; | 522 | globalFlagBlockAgendaItemUpdate = 1; |
523 | if ( mSelected ) | ||
524 | return; | ||
530 | } | 525 | } |
@@ -539,3 +534,4 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) | |||
539 | if ( mSelected ) { | 534 | if ( mSelected ) { |
540 | paintFrom = paintPixSel(); | 535 | paintMe( mSelected ); |
536 | return; | ||
541 | } else { | 537 | } else { |
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h index dc2316a..7103abe 100644 --- a/korganizer/koagendaitem.h +++ b/korganizer/koagendaitem.h | |||
@@ -105,3 +105,2 @@ class KOAgendaItem : public QWidget | |||
105 | static QPixmap * paintPix(); | 105 | static QPixmap * paintPix(); |
106 | static QPixmap * paintPixSel(); | ||
107 | static QPixmap * paintPixAllday(); | 106 | static QPixmap * paintPixAllday(); |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 5a63b35..f811fba 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -605,3 +605,3 @@ KOAgendaView::~KOAgendaView() | |||
605 | delete KOAgendaItem::paintPix(); | 605 | delete KOAgendaItem::paintPix(); |
606 | delete KOAgendaItem::paintPixSel(); | 606 | delete KOAgendaItem::paintPixAllday(); |
607 | } | 607 | } |