[Kst] [Bug 117821] datamode is borked (sideways?)

Andrew Walker arwalker at sumusltd.com
Wed Dec 7 00:32:44 CET 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=117821         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2005-12-07 00:32 -------
SVN commit 486173 by arwalker:

BUG:117821 Fix typo

 M  +3 -4      kst2dplot.cpp  


--- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #486172:486173
 @ -3505,7 +3505,6  @
     ypos = (double)(pos.y() - pr.top())/(double)pr.height();
   }
   ypos = ypos * (ymin - ymax) + ymax;
-
   if (isYLog()) {
     ypos = pow(10.0, ypos);
   }
 @ -3515,7 +3514,7  @
 bool Kst2DPlot::getNearestDataPoint(const QPoint& pos, QString& name, double &newxpos, double &newypos, double xpos, double ypos, double xmin, double xmax) {
   QRect pr = GetPlotRegion();
   bool rc = false;
-    
+
   // only makes sense to get nearest data point for vcurves
   KstVCurveList vcurves = kstObjectSubList<KstBaseCurve,KstVCurve>(Curves);
   if (vcurves.count() > 0) {
 @ -3530,12 +3529,12  @
     if (_xReversed) {
       dx_per_pix = (double)(pr.right() + 2 - pos.x() + 2) / (double)pr.width() * (xmax - xmin) + xmin;
     } else {
-      dx_per_pix = (double)(pos.x()+2 - pr.left() + 2) / (double)pr.width() * (xmax - xmin) + xmin;
+      dx_per_pix = (double)(pos.x() + 2 - pr.left() + 2) / (double)pr.width() * (xmax - xmin) + xmin;
     }
     if (isXLog()) {
       dx_per_pix = pow(10.0, dx_per_pix);
     }
-    dx_per_pix -= newxpos;  
+    dx_per_pix -= xpos;  
     
     for (KstVCurveList::Iterator i = vcurves.begin(); i != vcurves.end(); ++i) {
       i_near_x = (*i)->getIndexNearXY(xpos, dx_per_pix, ypos);


More information about the Kst mailing list