[Kst] extragear/graphics/kst/kst

Andrew Walker arwalker at sumusltd.com
Sun Dec 18 01:51:11 CET 2005


SVN commit 489314 by arwalker:

CCBUG:118148 better label behavior in printing and painting

 M  +2 -1      kstborderedviewobject.cpp  
 M  +1 -5      kstviewlabel.cpp  


--- trunk/extragear/graphics/kst/kst/kstborderedviewobject.cpp #489313:489314
@@ -71,10 +71,10 @@
 
 
 void KstBorderedViewObject::paint(KstPainter& p, const QRegion& bounds) {
+  p.save();
   if (p.makingMask()) {
     p.setRasterOp(Qt::SetROP);
   }
- // if (_borderWidth > 0 && !_focus && !_selected) {
   if (_borderWidth > 0) {
     QRect r;
     QPen pen(_borderColor, _borderWidth);
@@ -86,6 +86,7 @@
     r.setHeight(_geom.height() - 2 * _margin - _borderWidth + 1);
     p.drawRect(r);
   }
+  p.restore();
   KstViewObject::paint(p, bounds);
 }
 
--- trunk/extragear/graphics/kst/kst/kstviewlabel.cpp #489313:489314
@@ -329,7 +329,6 @@
   p.save();
   if (p.type() == KstPainter::P_PRINT ||
       p.type() == KstPainter::P_EXPORT) {
-    //p.save();
     if (_autoResize) {
       adjustSizeForText(p.window());
     } else {
@@ -345,7 +344,6 @@
 
     drawToPainter(_parsed, p);
     //setDirty();
-    //p.restore();
   } else {
     if (p.type() == KstPainter::P_UPDATE) {
       setDirty();
@@ -369,9 +367,7 @@
     }
   }
   p.restore();
-  if (!_transparent) {
-    KstBorderedViewObject::paint(p, bounds);
-  }
+  KstBorderedViewObject::paint(p, bounds);
 }
 
 


More information about the Kst mailing list