[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Mar 16 00:37:42 CET 2005


This is why I had an assert() in there before.  You removed it here:
http://mail.kde.org/pipermail/kst/2004-December/004785.html

How exactly are we getting a width or height = 0?  Using a runtime check is 
just circumventing the proper fix I think.

On Tuesday 15 March 2005 18:17, Andrew Walker wrote:
> CVS commit by arwalker:
>
> Prevent a crash that results when trying to draw into a null pixmap. This
> can happen when a plot takes up either zero width or zero height in a
> window.
>
>
>   M +6 -7      kst2dplot.cpp   1.376
>
>
> --- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.375:1.376
> @@ -2136,4 +2136,5 @@ void Kst2DPlot::draw() {
>
>    _buffer.buffer().resize(size());
> +  if (!_buffer.buffer().isNull()) {
>    _buffer.buffer().fill(backgroundColor());
>    QPainter p(&_buffer.buffer());
> @@ -2139,6 +2140,6 @@ void Kst2DPlot::draw() {
>    QPainter p(&_buffer.buffer());
>    p.setWindow(0, 0, geometry().width(), geometry().height());
> -
>    draw(p, P_PAINT);
> +  }
>  }
>
>
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/


More information about the Kst mailing list