Version: 1.2.0_svn_485855 (using KDE KDE 3.4.2) Installed from: Fedora RPMs OS: Linux Datamode is borked. It seems to search for the nearest datapoint to the cursor horozontally, rather than vertically. This is very confusing. How to reproduce: Plot a curve. Turn on datamode. Move mouse around.
1.2.0 item.
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);