[Kst] [Bug 126992] Crash when printing plot with legend

Andrew Walker arwalker at sumusltd.com
Wed May 10 18:58:29 CEST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=126992         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2006-05-10 18:58 -------
SVN commit 539423 by arwalker:

BUG:126992 A narrower fix than the proposed patch, as we may wish to later change the printing resize functions

 M  +10 -8     kstviewlegend.cpp  
 M  +0 -3      kstviewobject.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewlegend.cpp #539422:539423
 @ -207,14 +207,16  @
   setDirty(false);
 
   _backBuffer.buffer().resize(contentsRect().size());
-  _backBuffer.buffer().fill(backgroundColor());
-  KstPainter p;
-  p.begin(&_backBuffer.buffer());
-  QPen pen;
-  pen.setColor(foregroundColor());
-  p.setPen(pen);
-  drawToPainter(p);
-  p.end();
+  if (!_backBuffer.buffer().isNull()) {
+    _backBuffer.buffer().fill(backgroundColor());
+    KstPainter p;
+    p.begin(&_backBuffer.buffer());
+    QPen pen;
+    pen.setColor(foregroundColor());
+    p.setPen(pen);
+    drawToPainter(p);
+    p.end();
+  }
 }
 
 
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.cpp #539422:539423
 @ -625,7 +625,6  @
 void KstViewObject::parentResizedForPrint() {
   _geomOld = _geom;
   updateFromAspect();
-  //updateSelf();
   for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
     (*i)->parentResizedForPrint();
   }
 @ -634,8 +633,6  @
 
 void KstViewObject::parentRevertedForPrint() {
   _geom = _geomOld;
-  invalidateClipRegion();
-  updateSelf();
   for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
     (*i)->parentRevertedForPrint();
   }


More information about the Kst mailing list