Bug 83377

Summary: Zooming on lower plots causes zooming on top plot
Product: [Applications] kst Reporter: Rick Chern <rchern>
Component: generalAssignee: George Staikos <staikos>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rick Chern 2004-06-14 20:19:52 UTC
Version:           0.98-devel (using KDE KDE 3.2.1)
Installed from:    RedHat RPMs
Compiler:          gcc (GCC) 3.3.2 20031022  
OS:                Linux

When two or more plots in the same window are displayed, with each plot displaying large (200000 or so data points) curves, XY-mouse zoom on lower plots causes zoom on top plot.  Also, font sizes for the axes and title labels in the top plot become enlarged.

How to reproduce:
1. Start Kst, create two or more large (200000 data points) curves (gyrodata.dat can be used)
2. Create two or more plots in the same window, and plot at least one of the curves on each plot. 
3. In XY-Mouse zoom mode, zoom in on one of the lower plots
4. Problem with top plot occurs.
5. Subsequent zooms on lower plots may or may not cause the same problem. 

Expected Behaviour:
Top plot should not be affected.

Problem occurs only with HEAD.
Comment 1 George Staikos 2004-06-15 03:11:11 UTC
I see weird behaviour on my laptop too.  It's worse than what you describe even.  Needs more investigation...
Comment 2 George Staikos 2004-06-15 17:11:38 UTC
I see the problem.  Reusing the painter was a mistake.
Comment 3 George Staikos 2004-06-15 19:22:42 UTC
CVS commit by staikos: 

Don't repaint in the wrong painter (or even at all, actually)

CCMAIL: 83377-done@bugs.kde.org


  M +0 -2      kst2dplot.cpp   1.88


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.87:1.88
@@ -977,5 +976,4 @@ void Kst2DPlot::paint(QPainter& p) {
     dm->xOffset = _xLeft;
     triggerBorderAdjustments(_xLeft);
-    paint(p, dm->xOffset);
   } else {
     _xLeft = dm->xOffset;