[Kst] [Bug 131693] Crash when resizing plot with legend

Andrew Walker arwalker at sumusltd.com
Wed Aug 2 00:18:53 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=131693         
arwalker sumusltd com changed:

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



------- Additional Comments From arwalker sumusltd com  2006-08-02 00:18 -------
SVN commit 568678 by arwalker:

BUG:131693 Don't try to paint to an empty bitmap as it causes a crash.

 M  +10 -8     kstviewlegend.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewlegend.cpp #568677:568678
 @ -219,14 +219,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 (!contentsRect().size().isEmpty()) {
+    _backBuffer.buffer().fill(backgroundColor());
+    KstPainter p;
+    p.begin(&_backBuffer.buffer());
+    QPen pen;
+    pen.setColor(foregroundColor());
+    p.setPen(pen);
+    drawToPainter(p);
+    p.end();
+  }
 }


More information about the Kst mailing list