Bug 135049 - Rare drawing bug with XY curves
Summary: Rare drawing bug with XY curves
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-03 17:46 UTC by Nicolas Brisset
Modified: 2006-10-06 04:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase for bug #135049 (35.25 KB, application/x-tgz)
2006-10-03 17:50 UTC, Nicolas Brisset
Details

Note You need to log in before you can comment on or make changes to this bug.
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));
                   }
                 }