Bug 135049

Summary: Rare drawing bug with XY curves
Product: [Applications] kst Reporter: Nicolas Brisset <nicolas.brisset>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Solaris   
Latest Commit: Version Fixed In:
Attachments: Testcase for bug #135049

Description Nicolas Brisset 2006-10-03 17:46:38 UTC
Version:           1.3.0 (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

In some very rare circumstances a drawing bug occurs whereby wrong lines are drawn connecting some far away points, the others being hidden.
I won't bother to describe this better as I have a testcase coming :-)

Note that this is quite rare, I would not rate it as high priority. I hope it's easy to fix, otherwise it can wait (I'd much rather see metadata handled properly than this fixed!). But I thought I'd document it anyway...
Comment 1 Nicolas Brisset 2006-10-03 17:49:21 UTC
Note that if you move the curve in any direction by pressing an arrow key once, it will disappear. This is really a naughty one...
Comment 2 Nicolas Brisset 2006-10-03 17:50:05 UTC
Created attachment 17999 [details]
Testcase for bug #135049
Comment 3 George Staikos 2006-10-06 04:53:32 UTC
SVN commit 592880 by staikos:

if we're going to draw a line segment and jump we'd better flush the polyline
too
BUG: 135049


 M  +4 -0      kstvcurve.cpp  


--- trunk/extragear/graphics/kst/src/libkstmath/kstvcurve.cpp #592879:592880
@@ -1045,6 +1045,10 @@
                     minY = Ly;
                   }
                   if (KDE_ISUNLIKELY(minY >= Ly && minY <= Hy && maxY >= Ly && maxY <= Hy)) {
+                    if (index > 0) {
+                      p->drawPolyline(points, 0, index);
+                      index = 0;
+                    }
                     p->drawLine(X2i, d2i(minY), X2i, d2i(maxY));
                   }
                 }