[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: koffice/kchart/shape
From:       Inge Wallin <inge () lysator ! liu ! se>
Date:       2010-05-13 16:51:29
Message-ID: 201005131851.30235.inge () lysator ! liu ! se
[Download RAW message or body]

On Thursday 13 May 2010 18:51:18 Inge Wallin wrote:
> SVN commit 1126321 by ingwa:
> 
> Don't crash if the chart is resized so that the plotarea gets a zero
> width or height.
> 
> CCBUG: 221213
> 
> This should be backported to the 2.2 branch.
> 
> 
> 
>  M  +6 -1      PlotArea.cpp
> 
> 
> --- trunk/koffice/kchart/shape/PlotArea.cpp #1126320:1126321
> @@ -1104,7 +1104,12 @@
>      // KDChart thinks in pixels, KOffice in pt
>      ScreenConversions::scaleFromPtToPx( painter );
> 
> -    d->kdChart->paint( &painter, ScreenConversions::scaleFromPtToPx(
> paintRect ) ); +    // Only paint the actual chart if there is a certain
> minimal size, +    // because otherwise kdchart will crash.
> +    QRect kdchartRect = ScreenConversions::scaleFromPtToPx(paintRect);
> +    if (kdchartRect.width() > 10 && kdchartRect.height() > 10) {
> +        d->kdChart->paint(&painter, kdchartRect);
> +    }
>      //painter.restore();
> 
>      // Paint the cached pixmap if we got a GO from paintPixmap()

I suppose that nobody has any problems with me backporting this to 2.2?  It's 
a very basic fix, and it does prevent a crash.

	-Inge
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic