summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-23 11:47:33 (UTC)
committer zautrix <zautrix>2005-03-23 11:47:33 (UTC)
commit913291ec9784520cc6ff9769081c03bd74a5ab07 (patch) (unidiff)
treeabc324e407ea03c312511f83d735b6039d9b36bb /korganizer
parentc99ce87456abd342befc7820d3e1376f9560183a (diff)
downloadkdepimpi-913291ec9784520cc6ff9769081c03bd74a5ab07.zip
kdepimpi-913291ec9784520cc6ff9769081c03bd74a5ab07.tar.gz
kdepimpi-913291ec9784520cc6ff9769081c03bd74a5ab07.tar.bz2
koa item resize crash fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 5ee433a..7e6fa48 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -472,2 +472,3 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
472 int xx = x(); 472 int xx = x();
473
473 if ( xPaintCoord != xx || yPaintCoord != yy || 474 if ( xPaintCoord != xx || yPaintCoord != yy ||
@@ -499,3 +500,22 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
499 } 500 }
500 bitBlt (this, rx, ry, paintFrom, x()+rx ,yPaintCoord+ry, rw, rh ,CopyROP); 501 xx += rx;
502
503 if ( xx < 0 ) {
504 rw = rw + xx;
505 rx -= xx;
506 xx = 0;
507 if ( rw < 0 ) {
508 qDebug("KOAgendaItem::Width1 < 0. Returning ");
509 return;
510 }
511 }
512 if ( paintFrom->width() < xx+rw ) {
513 rw = paintFrom->width() - xx;
514 if ( rw < 0 ) {
515 qDebug("KOAgendaItem::Width2 < 0. Returning ");
516 return;
517 }
518 }
519 //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh);
520 bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,CopyROP);
501} 521}