summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp2
-rw-r--r--korganizer/koagendaitem.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index eb3791e..7e0b216 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1629,13 +1629,13 @@ void KOAgenda::computeSizes()
1629 } 1629 }
1630 } 1630 }
1631 int cw = contentsWidth(); 1631 int cw = contentsWidth();
1632 int ch = contentsHeight(); 1632 int ch = contentsHeight();
1633 if ( mAllDayMode ) { 1633 if ( mAllDayMode ) {
1634 QPixmap* paintPixAll = KOAgendaItem::paintPixAllday(); 1634 QPixmap* paintPixAll = KOAgendaItem::paintPixAllday();
1635 if ( paintPixAll->width() < cw || paintPixAll->height() < ch ) 1635 if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 )
1636 paintPixAll->resize( cw, ch ); 1636 paintPixAll->resize( cw, ch );
1637 } else { 1637 } else {
1638 QPixmap* paintPix = KOAgendaItem::paintPix(); 1638 QPixmap* paintPix = KOAgendaItem::paintPix();
1639 if ( paintPix->width() < cw || paintPix->height() < ch ) 1639 if ( paintPix->width() < cw || paintPix->height() < ch )
1640 KOAgendaItem::resizePixmap( cw , ch ); 1640 KOAgendaItem::resizePixmap( cw , ch );
1641 } 1641 }
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 6965ba7..62281d4 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -424,27 +424,27 @@ void KOAgendaItem::resizePixmap( int w , int h )
424 424
425} 425}
426QPixmap * KOAgendaItem::paintPix() 426QPixmap * KOAgendaItem::paintPix()
427{ 427{
428 static QPixmap* mPaintPix = 0; 428 static QPixmap* mPaintPix = 0;
429 if ( ! mPaintPix ) 429 if ( ! mPaintPix )
430 mPaintPix = new QPixmap(); 430 mPaintPix = new QPixmap(1,1);
431 return mPaintPix ; 431 return mPaintPix ;
432} 432}
433QPixmap * KOAgendaItem::paintPixAllday() 433QPixmap * KOAgendaItem::paintPixAllday()
434{ 434{
435 static QPixmap* mPaintPixA = 0; 435 static QPixmap* mPaintPixA = 0;
436 if ( ! mPaintPixA ) 436 if ( ! mPaintPixA )
437 mPaintPixA = new QPixmap(); 437 mPaintPixA = new QPixmap(1,1);
438 return mPaintPixA ; 438 return mPaintPixA ;
439} 439}
440QPixmap * KOAgendaItem::paintPixSel() 440QPixmap * KOAgendaItem::paintPixSel()
441{ 441{
442 static QPixmap* mPaintPixSel = 0; 442 static QPixmap* mPaintPixSel = 0;
443 if ( ! mPaintPixSel ) 443 if ( ! mPaintPixSel )
444 mPaintPixSel = new QPixmap(); 444 mPaintPixSel = new QPixmap(1,1);
445 return mPaintPixSel ; 445 return mPaintPixSel ;
446} 446}
447void KOAgendaItem::paintEvent ( QPaintEvent *e ) 447void KOAgendaItem::paintEvent ( QPaintEvent *e )
448{ 448{
449 449
450 if ( globalFlagBlockAgendaItemPaint ) 450 if ( globalFlagBlockAgendaItemPaint )