Summary: | datamode is borked (sideways?) | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Matthew Truch
2005-12-06 21:09:52 UTC
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); |