[Kst] extragear/graphics/kst/src/libkstapp

George Staikos staikos at kde.org
Tue Aug 1 23:12:53 CEST 2006


This patch can't be correct.  It is a precondition violation for the object to 
have size 0.

Quoting Andrew Walker <arwalker at sumusltd.com>:

> 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();
> +  }
>  }
>  
>  
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
> 
> 


-- 
George Staikos 



More information about the Kst mailing list